ROAuth - 握手中的错误 - “你可能错误地输入了你的PIN ...”

时间:2013-04-06 20:24:18

标签: r twitter-oauth

握手返回以下错误,在生成有效的令牌网址后我输入了PIN码。

Error in cred$handshake() : Invalid response after authorization. You likely misentered your PIN, try rerunning this handshake & browser authorization to get a new PIN.

我已经三次检查过我没有错误地输入引脚。在函数中放置一些打印件表明'oauth_token_secret'不在oauthPOST()的响应中?

要重现的代码和我的系统配置文件如下。提前谢谢。

library(twitteR);
library(tm);
library(wordcloud);
library(RColorBrewer);
library(ROAuth);
library(RCurl);
library(digest);

##consumer key
twit_consumer_key='XXXXXXXXXXXXXX';
##consumer secret
twit_consumer_secret='XXXXXXXXXXXXXXXXXX';
##request token URL
twit_request_url='https://api.twitter.com/oauth/request_token';
##access token URL
twit_access_url='https://api.twitter.com/oauth/access_token';
##authorize URL
twit_authorize_url='https://api.twitter.com/oauth/authorize';

cred <- OAuthFactory$new(consumerKey=twit_consumer_key,
                         consumerSecret=twit_consumer_secret,
                         requestURL=twit_request_url,
                         accessURL=twit_authorize_url,
                         authURL=twit_authorize_url);
cred$handshake();

以下是会话信息:

> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8       
 [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] digest_0.6.3       wordcloud_2.2      RColorBrewer_1.0-5 Rcpp_0.10.3        tm_0.5-8.3        
[6] twitteR_1.1.0      rjson_0.2.12       RCurl_1.95-4.1     bitops_1.0-5      

loaded via a namespace (and not attached):
[1] codetools_0.2-8 slam_0.1-28     tools_2.15.3

0 个答案:

没有答案