I am using R and I need to retrieve the few most recent posts from a Twitter user (@ExpressNewsPK) using twitteR api. I have created an account and have an access token, etc. I have used the following command to extract the tweets:
express_news_tweets <- searchTwitter("@ExpressNewsPK", n = 10, lang = "en" )
searchTwitter would search with the search string provided (here @ExpressNewsPK). So instead of giving tweets by @ExpressNewsPK it would give tweets which are directed to @ExpressNewsPK.
To get tweets from @ExpressNewsPK, you have a function named
userTimeline which would give tweets from a particular user.
So after you are done with
setup_twitter_oauth, you can try
read more about it at