【问题标题】:ROAuth handshakeROAuth握手
【发布时间】:2012-07-28 12:52:16
【问题描述】:

我一直在尝试使用以下脚本通过 ROAuth 进行身份验证:

    library("ROAuth")
    library("RCurl")

requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL = "https://api.twitter.com/oauth/access_token"
authURL = "https://api.twitter.com/oauth/authorize"


cKey<- "Key"
cSecret<- "Secret"


Cred <- OAuthFactory$new(consumerKey=cKey,
            consumerSecret=cSecret,
            requestURL=requestURL,
            accessURL=accessURL,
            authURL=authURL)

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

每次我输入这段代码时,我都会收到错误:

Error in Cred$handshake(cainfo = system.file("CurlSSL", "cacert.pem",  : Invalid response from site, please check your consumerKey and consumerSecret and try again.

我不确定我做错了什么。通过重新安装 ROauth 和 RCurl 并检查它们的版本信息(ROAuth 0.9.1 和 RCurl_1.91-1.1(?) ),我确保每个必要的软件包都是最新的。安装后,我重新启动了 R(作为另一篇文章建议的可能解决方案)。我复制粘贴并仔细检查了消费者密钥和消费者秘密,我确信它们是正确的。有没有人有任何其他想法?

谢谢。

【问题讨论】:

    标签: r twitter oauth handshake rcurl


    【解决方案1】:

    我对 RCurl/ROAuth 无能为力——但你可以试试这个包 ‛httr‛ https://github.com/hadley/httr/ 。它附带一个演示如何访问 Twitter。

    【讨论】:

      【解决方案2】:

      显然 ROauth 中的握手方法已损坏,但已修复。您发布的错误消息(与我现在收到的相同)与以下链接中引用的错误消息相同:

      http://lists.hexdump.org/pipermail/twitter-users-hexdump.org/2012-February/000059.html

      我猜还是有问题,所以看看我是否能找到其他任何东西......

      【讨论】:

        猜你喜欢
        • 2020-05-04
        • 2013-08-12
        • 2012-11-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-09-18
        • 2011-08-20
        • 1970-01-01
        相关资源
        最近更新 更多