【问题标题】:oauth Handshake error using twitteR in R在 R 中使用 twitteR 的 oauth 握手错误
【发布时间】:2014-07-29 01:02:01
【问题描述】:

我一直在尝试使用 R 中的 tweeteR 包下载一些推文

我的 oauth 凭据的代码是

cred<-AuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,requestURL=reqURL,accessURL=accessURL,authURL=authURL)

当我尝试运行以下握手时

cred$handshake(cainfo=system.file("CurlSSL","cacert.pem",package="RCurl"))

我收到了这个错误

Error in function (type, msg, asError = TRUE)  : 
Could not resolve host: api.twitter.com; No data record of requested type

我在 Windows 机器上运行代码。 (我已经附上了下载cacert.pem的代码)

【问题讨论】:

    标签: r twitter oauth rcurl


    【解决方案1】:

    我为此制定了解决方案,对于使用代理的人,他们也必须在 RCurl 中设置代理选项(为 R 设置代理是不够的)。此命令有效

    options( RCurlOptions = list(verbose = TRUE,proxy = "host:port"))
    

    【讨论】:

      猜你喜欢
      • 2020-05-04
      • 1970-01-01
      • 2016-08-16
      • 1970-01-01
      • 2015-03-22
      • 1970-01-01
      • 2016-11-19
      • 2011-07-12
      • 1970-01-01
      相关资源
      最近更新 更多