2

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:

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

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.

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.

4

1 回答 1

1

我有类似的问题,不得不做两个改变。

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

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

于 2013-07-12T14:33:10.703 回答