R 和 twitteR - userTimeline() 函数未返回请求的推文数量 [英] R and twitteR - userTimeline() function not returning the number of tweets requested

查看:17
本文介绍了R 和 twitteR - userTimeline() 函数未返回请求的推文数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我在使用 twitteR 包中的 userTimeline() 函数时无法获得我请求的推文数量?我现在对用户时间线的限制请求是 3200 条推文,但我只得到了其中的 10% 左右......

Why can't I get the number of tweets I request when I use the userTimeline() function in the twitteR package ? I now the limit request for a user timeline is 3200 tweets but I just get about 10% of that...

这里有两个例子:

在这个例子中,'googledevs' 帐户只有 2,000 条推文,所以我确实要求了 1000 条推文,但我仍然只有 106 条......

In this example 'googledevs' account has only 2,000 tweets so I did ask for 1000 tweets and I still only got 106...

> library(twitteR)
> load('OAuth.RData')
> test <- userTimeline(user = 'googledevs', n=1000)
> length(test)
[1] 106

在本例中,FiveThirtyEight"有 5622 条推文.所以我要了 3200 只得到了 317...

In this example 'FiveThirtyEight' has 5622 tweets. So I asked for 3200 and only got 317...

> library(twitteR)
> load('OAuth.RData')
> test2 <- userTimeline(user = 'FiveThirtyEight', n=3200)
> length(test2)
[1] 317

有人可以帮我解决这个问题吗?谢谢

Can someone help me fix this ? Thank you

推荐答案

Twitter API 只会返回过去一周左右的推文.请参阅文档.

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

搜索 API 不是所有推文的完整索引,而是最近推文的索引.目前该索引包括 6-9 天的推文."

"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."

这篇关于R 和 twitteR - userTimeline() 函数未返回请求的推文数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆