You would use the Twitter API and you can read more about how to do that here, And there is also an example provided. https://dev.twitter.com/rest/reference/get/statuses/user_timeline