R中的ROAuth twitter streaming-API?

时间:2016-12-06 11:16:11

标签: r twitter-streaming-api

我正在关注 - https://cran.r-project.org/web/packages/streamR/streamR.pdf

提供的streamR pkg文档 到目前为止,我已经采取了步骤 -

library(ROAuth)
library(streamR)
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
consumerKey <- "my consumer key"
consumerSecret <- " my secret key"

my_oauth <- OAuthFactory$new(consumerKey = consumerKey, consumerSecret =         consumerSecret,requestURL = requestURL, accessURL = accessURL, authURL = authURL)
my_oauth$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))

第一个代码对我来说很好,但在那之后,我得到了以下错误 -     错误:需要授权。

建议我这个程序有什么问题?

0 个答案:

没有答案