ROAuth 和 twitteR,Mac OS X 10.7,R 2.15 [英] ROAuth and twitteR, Mac OS X 10.7, R 2.15

查看:31
本文介绍了ROAuth 和 twitteR,Mac OS X 10.7,R 2.15的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难让我的 OAuth 正常工作,因此我每小时可以对 twitter 的 API 进行 350 次调用.

I'm having a very difficult time getting my OAuth to work so that I can make 350 calls per hour to twitter's API.

我已经查看了其他几个主题相似的主题,但我的问题似乎有所不同:

I have reviewed several other threads with similar topics, but my problem appears to be different:

twitteR 和 ROAuth R 包安装

twitteR 和 ROAuth

TwitteR、ROAuth 和 Windows:注册 OK,但是证书验证失败

我的代码如下:

    rm(list=ls())
    library("twitteR")
    library("ROAuth")
    requestURL <- "https://api.twitter.com/oauth/request_token"
    accessURL = "https://api.twitter.com/oauth/access_token"
    authURL = "https://api.twitter.com/oauth/authorize"
    cKey = "__________"
    cSecret = "__________"
    Cred <- OAuthFactory$new(consumerKey=cKey,
                consumerSecret=cSecret,
                requestURL=requestURL,
                accessURL=accessURL,
                authURL=authURL)
    Cred$handshake()
    registerTwitterOAuth(Cred)

尽管尝试了相同代码的许多不同版本、重置了我的 API 密钥,甚至注册了一个新帐户并检索了一个新的 API 密钥,我还是不断返回此错误:

Despite trying many different versions of the same code, resetting my API key, and even registering a new account and retrieiving a new API key, i continually return this error:

    Error in Cred$handshake() : 
    Invalid response from site, please check your consumerKey and consumerSecret and try again.

这绝对不可能是我的密钥/秘密的问题.还有其他想法吗?

There is absolutely no way this could be an issue with my key/secret. Any other ideas?

推荐答案

问题解决:

我已经下载了这个新版本的 ROAuth (http://lists.hexdump.org/pipermail/twitter-users-hexdump.org/2012-February/000059.html) 但还没有重新启动 R!呸!

I had already downloaded this new version of ROAuth (http://lists.hexdump.org/pipermail/twitter-users-hexdump.org/2012-February/000059.html) but had not restarted R! duh!

这篇关于ROAuth 和 twitteR,Mac OS X 10.7,R 2.15的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆