我試圖連接到Twitter的流API在R.我的代碼(包括假的消費者密鑰和密碼)R Twitter的數據流的API如下:訪問使用使用streamR&ROAuth
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碼。
歡迎任何有關如何解決此問題(並檢索我需要的PIN以啓用我嘗試創建的連接)的想法!