2
嘗試通過R(TwitteR)訪問Twitter應用程序時,我無法獲得PIN碼。當它向我提供URL並要求輸入PIN碼時,該URL只會指向我的網站(在Chrome中)。在Safari和Firefox中,該網站顯示「SSL是必需的」。我在控制檯中沒有任何錯誤消息;然而,我不知道在哪裏得到PIN(我已經搜遍了)。感謝任何幫助。TwitteR無法獲取密碼
從我所知道的,我已經正確設置了Twitter應用程序中的所有設置。
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
library(RCurl)
# Set SSL certs globally (I tried this after it didn't work without it)
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
consumerKey <- "xxxxxxxxxxxxxx"
consumerSecret <- "xxxxxxxxxxxxxxxx"
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
twitCred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
同樣的問題在這裏。你修好了嗎? – ianaz