Roauth认证时twitteR PIN码出现在哪里? [英] Where does twitteR PIN code appear during R oauth authentication?

查看:36
本文介绍了Roauth认证时twitteR PIN码出现在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 twitteR 包,因为我已经阅读了 Jeffrey Stanton 免费的数据科学电子书中的 Twitter 章节.

I’m trying to use the twitteR package as I’ve gotten to the Twitter chapter in Jeffrey Stanton’s free e-book on Data science.

我使用此代码注册我的凭据:

I use this code to register my credentials:

requestURL <-  "https://api.twitter.com/oauth/request_token"
accessURL =    "https://api.twitter.com/oauth/access_token"
authURL =      "https://api.twitter.com/oauth/authorize"
consumerKey =   "------------"
consumerSecret = "-----------"
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
                         consumerSecret=consumerSecret,
                         requestURL=requestURL,
                         accessURL=accessURL,
                         authURL=authURL)
download.file(url="http://curl.haxx.se/ca/cacert.pem",
          destfile="cacert.pem")
twitCred$handshake(cainfo="cacert.pem")

然后我得到了推特的链接:

I then get the link to twitter:

要启用连接,请将您的网络浏览器定向到:https://api.twitter.com/oauth/authorize?oauth_token=xxxx

To enable the connection, please direct your web browser to: https://api.twitter.com/oauth/authorize?oauth_token=xxxx

我点击链接和 Twitter 页面,然后点击授权应用"按钮.这会将我发送回我列为回调 URL 的站点.

I follow the link and within the twitter page, and then click on the "Authorize app" button. This sends me back to the site I listed as the callback URL.

我在任何地方都没有看到我期望的 PIN 码.我的问题是:它出现在哪里?或者我应该在哪里寻找它?我觉得这应该是显而易见的,但不知何故我错过了.

I don’t see the PIN number I was expecting anywhere. My question is: where does it appear? Or where should I be looking for it? I feel like this should be obvious, but somehow I'm missing it.

推荐答案

我遇到了类似的问题,不得不进行两次更改.

I had similar problems, and had to make two changes.

1 - 如 SimonO101 所述,将所有 https 更改为 http

1 - change all https to http as mentioned by SimonO101

2 - 确保删除回调 URL - 否则不会显示 PIN,而是简单地移动到回调 URL 目标

2 - make sure to delete the callback URL - otherwise rather than displaying the PIN is simply moved on to the callback URL destination

这篇关于Roauth认证时twitteR PIN码出现在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆