我正在尝试连接Twitter在R中的流API。我的代码(包括一个伪造的消费者密钥和秘密)如下:
library(streamR)
library(ROAuth)
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
consumerKey <- "xxxxxxxyyyyyyyyzzzzzzzz"
consumerSecret <- "xxxxxxxyyyyyyyyzzzzzzzz123123123123123"
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"))当我输入此代码时,我收到以下消息(尽管我已经更改了网址):
To enable the connection, please direct your web browser to:
http://api.twitter.com/oauth/authorize?oauth_token=xxxxxxxyyyyyyyyzzzzzzzz
When complete, record the PIN given to you and provide it here: 接下来,我在浏览器中看到以下屏幕:

我选择了“授权应用”,然后我就离开了api.twitter.com。我从来没有看到我需要的个人识别码,以便继续前进。
欢迎任何关于如何解决这个问题的想法(并找回我需要的PIN,以便启用我正在尝试创建的连接)!
发布于 2015-11-03 14:02:05
我删除了回调URL,这就解决了这个问题。
发布于 2015-12-07 01:39:55
您只需在RSTudio控制台中输入pin即可
https://stackoverflow.com/questions/33490191
复制相似问题