首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用ROauth获取个人识别码

无法使用ROauth获取个人识别码
EN

Stack Overflow用户
提问于 2013-03-10 08:03:24
回答 1查看 2.1K关注 0票数 0

我已经按照这里设置的步骤进行了操作:http://cran.r-project.org/web/packages/twitteR/vignettes/twitteR.pdf

我拥有的代码如下:

代码语言:javascript
复制
library(ROAuth)
cred <- OAuthFactory$new(consumerKey="xyz",
consumerSecret=xyz",
requestURL="https://api.twitter.com/oauth/request_token",
accessURL="https://api.twitter.com/oauth/authorize",
authURL="https://api.twitter.com/oauth/access_token")
cred$handshake(ssl.verifypeer = FALSE)

当我获得推特链接时:https://api.twitter.com/oauth/access_token?oauth_token=YZZOYJ1liH1TDEY8G6Eb3YmgAWQlgGiEfAzI1ADwZ4

并加载到我的浏览器,它会带回一个空白页面,没有关于个人识别码的信息。谁能告诉我为什么这个链接是空白的

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-03-10 15:07:31

因为您访问了错误的URL以进行授权。交换您的authaccess urls!

代码语言:javascript
复制
accessURL="https://api.twitter.com/oauth/access_token",
authURL="https://api.twitter.com/oauth/authorize")

#You should get...
Cred$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=someaccessstokenvalue
When complete, record the PIN given to you and provide it here: 

#Final step to register connections
registerTwitterOAuth(Cred)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15317370

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档