使用 searchTwitter() 的 R 最大推文中的 twitter 包 [英] twitter package in R maximum tweets using searchTwitter()

查看:42
本文介绍了使用 searchTwitter() 的 R 最大推文中的 twitter 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 R 中的 Twitter 包中,可以检索的最大推文数为 1500.如果我想检索 5000 我得到

IN Twitter Package in R maximum number of tweets which can be retrieved is 1500. If i want to retrieve 5000 i get

      a<-searchTwitter("#cricket",n=5000)
      Error in out$error : $ operator is invalid for atomic vectors

有什么方法可以帮助获得更多特定关键字的推文

Is there any way which will help in getting more tweets for particular keyword

推荐答案

如果您未通过身份验证,则 1500 是 Twitter API (https://dev.twitter.com/docs/api/1/get/search),虽然你的错误信息和我的不一样,这很奇怪:

If you are not authenticated then 1500 is the limit imposed by the Twitter API (https://dev.twitter.com/docs/api/1/get/search), though your error message is not the same as mine, which is strange:

          install.packages("twitteR")
          library(twitteR)
          BBC <- searchTwitter("BBC", n=1500)
          length(BBC)
          [1] 1500
          BBC <- searchTwitter("BBC", n=5000)
          Error in .self$twFromJSON(out) : Error: Invalid query

这篇关于使用 searchTwitter() 的 R 最大推文中的 twitter 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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