DV *_*hes 5 twitter r oauth data-mining twitter-oauth
我试图使用R中的twitteR软件包从他们的API编译推特上与世界杯相关的所有推文的语料库.
我将以下代码用于单个#标签(例如).但是,我的问题是看起来我只是"被授权"访问一组有限的推文(在这种情况下,只有最近的32条).
library(twitteR)
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
#consumerKey <- Omitted
#consumerSecret <- Omitted
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
twitCred$handshake()
#setwd("/Users/user/FIFA")
#save(twitCred, file="twitterAuthentication.Rdata")
#load("twitterAuthentication.Rdata")
registerTwitterOAuth(twitCred)
FIFA<-searchTwitter("#WorldCup", n=9999, since='2007-10-30')
Run Code Online (Sandbox Code Playgroud)
返回以下错误:
Warning message:
In doRppAPICall("search/tweets", n, params = params, retryOnRateLimit = retryOnRateLimit, :
9999 tweets were requested but the API can only return 32
Run Code Online (Sandbox Code Playgroud)
我的问题是:如何使用特定的标签访问最大数量的推文?(另外,有人可以澄清"最大"限制实际上是什么吗?为什么我似乎无法接近这个值(~1500条推文)?
我在Twitter Developer网站上测试了OAuth,并分别获得了Signature基本字符串,授权标题和cURL命令的签名结果,向我表明我拥有从Twitter服务器中提取相应数据的适当权限和授权.如果我错了,或者如果您需要进一步的信息,请告知/纠正我.
我的API权限目前设置为:读取,写入和访问直接消息
Session Info:
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RJSONIO_1.0-3 twitteR_1.1.7 rjson_0.2.12 ROAuth_0.9.3 digest_0.6.3 RCurl_1.95-4.1 bitops_1.0-5
[8] foreign_0.8-55
loaded via a namespace (and not attached):
[1] tools_3.0.2
Run Code Online (Sandbox Code Playgroud)
额外资源/来源:
使用searchTwitter()的R最大推文中的twitter包
此源声明最大值为1500
此源声明最大值为3200
| 归档时间: |
|
| 查看次数: |
15977 次 |
| 最近记录: |