搜索 Twitter(使用 R 和 TwitterR 包)得到 200 个结果

Search Twitter (using R and the TwitteR package) to get 200 results

如何使用 R 的 TwitterR 包获得超过 100 个搜索结果?

虽然我更喜欢 R 中的示例(因为它目前使用 R),但我可以轻松地使用 Java,因此,一个在 Java 中搜索 Twitter 以获得 200 次搜索的示例结果可能就足够了。

我什至不知道这是否可能。我不记得在搜索时看到过可以指定的 "page number"(Google API 支持)。我认为使用 Twitter 您可以指定最小的推文 ID,它只允许您获取较新的推文,但我不希望在这种情况下按预期工作(除非搜索结果是根据日期/时间排序的)而不是与搜索字词的相关性)。

我通过这种方式接收推文。

someTweets <- searchTwitter("#EroticBroadway", n=500)

n 参数告诉它要限制多少条推文。如果没有那么多推文,它不会 return 500。

来自docs

n The maximum number of tweets to return

还有一个time limit on the twitter api search

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.

t gem doesn't have that.

你必须跳过更多的环节,这有一些(很多)缺点,但我已经使用 TAGS 收集了数百条推文(随着时间的推移甚至数千条...)然后将它们作为 CSV 读入 R。