我很难在 Stack Overflow 上找到关于 R 上的 twitteR 包的问题的帮助。为了使这更简单,我将向您展示我输入的内容:
reqURL<-"https://api.twitter.com/oauth/request_token"
accessURL<-"http://api.twitter.com/oauth/access_token"
authURL<-"http://api.twitter.com/oauth/authorize"
cKey="{my consumer key}"
cSecret="{my consumer secret}"
oKey="{my oauth key}"
oSecret="{my oauth secret}"
credentials<-OAuthFactory$new(consumerKey=cKey,consumerSecret=cSecret,oauthKey=oKey,oauthSecret=oSecret, requestURL=reqURL,authURL=authURL)
credentials$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=aMog9rDmJTphmNv0wnkN2ELtVDl20npVq7Vzv4L0IA
When complete, record the PIN given to you and provide it here: {PIN entered here}
libidn: warning: libiconv not installed, cannot convert data to UTF-8
libidn: warning: libiconv not installed, cannot convert data to UTF-8
libidn: warning: libiconv not installed, cannot convert data to UTF-8
libidn: warning: libiconv not installed, cannot convert data to UTF-8
Error in function (type, msg, asError = TRUE) : Could not resolve host: xn--tmb; No data record of requested type
查看以“libidn”开头的警告,我想知道该软件包或我自己的计算机是否存在潜在问题,因为我只能在论坛上找到对超出我技术范围的事情的该错误的响应。我在 Windows Vista 32 位上运行,并且我有 R-2.14.1。