ROAuth 不再用于 httr?[推特API] [英] ROAuth no longer used in favor of httr? [Twitter API]
本文介绍了ROAuth 不再用于 httr?[推特API]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 AWSUbuntu Server 12.04.2 LTS"上运行 R Studio,并通过浏览器访问 R Studio.
I'm running R Studio on an AWS "Ubuntu Server 12.04.2 LTS" and accessing R Studio via my browser.
当我尝试使用带有代码的包 ROAuth
在 Twitter API 上进行身份验证时:
When I try to authenticate at the Twitter API using the package ROAuth
with the code:
credential<-OAuthFactory$new(consumerKey="xxxxx",
consumerSecret="xxxxx",
requestURL="https://api.twitter.com/oauth/request_token",
accessURL="https://api.twitter.com/oauth/access_token",
authURL="https://api.twitter.com/oauth/authorize")
credential$handshake()
registerTwitterOAuth(credential)
我在 registerTwitterOAuth(credential)
说后出错
Error in registerTwitterOAuth(credential) :
ROAuth is no longer used in favor of httr, please see ?setup_twitter_oauth
但是我找不到任何进一步的解释..
However I can't find any further explanation..
推荐答案
显然在我发布这个之前 twitteR 包被改变了,所以新的认证方式是
Apparently the twitteR package was changed right before I posted this, so the new way to authenticate is
setup_twitter_oauth(CUSTOMER_KEY, CUSTOMER_SECRET, ACCESS_TOKEN, ACCESS_secret, credentials_file=NULL)
见https://github.com/geoffjentry/twitteR
这篇关于ROAuth 不再用于 httr?[推特API]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文