R and twitteR - userTimeline() function not returning the number of tweets requested

人盡茶涼 提交于 2019-12-04 16:36:57

The Twitter API will only return tweets from the past week or so. See the documentation.

"The Search API is not complete index of all Tweets, but instead an index of recent Tweets. At the moment that index includes between 6-9 days of Tweets."

You need to include the includeRts=TRUE argument in your userTimeline call. This should give you the max of the number of tweets on the user's timeline and 3200.

You need to include the includeRts=TRUE argument in your userTimeline call. This will return the minimum of 3200 posts and the total posts on the user's timeline.

I believe the problem is that while it is only retrieving a certain number of tweets it is going through the maximum number you set. It includes retweets and replies. If you set to true the include replies and retweets options you should retrieve the total number of tweets you set. A nice workaround this limit is "making" time windows using the tweets ID and the sinceID and maxID options.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!