Twitter的包的R认证

Twitter的包的R认证

本文介绍了Twitter的包的R认证:错误401的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海兰大家/人,感谢您考虑它!
我被困在微博包验证的最后阶段。一个成功的名气$握手之后因为我想结束与 setup_twitter_oauth 的认证,该方案不断抛出以下消息:

Hy everyone/anyone and thank you for considering it!I'm stuck at the final stage of twitteR package authentication. After a successful cred$handshake as I'm trying to end up the authentication with setup_twitter_oauth, the program keeps throwing the following message:

Error in init_oauth1.0(self$endpoint, self$app, permission =
self$params$permission) : client error: (401) Unauthorized

任何想法,这可能是和我怎么能围绕它得到什么?

Any idea what this could be and how could I get around it?

推荐答案

不知道你的错误的precise来源,我有大约2个月前使用该软件包。我跑进做握手以及错误。

Not sure the precise source of your error, and I had used this package about 2 months ago. I ran into errors doing the handshake as well.

要与工作的时候,我避开了明确的握手使用 setup_twitter_oauth 直接

To work-around, I avoided the explicit handshake by using setup_twitter_oauth directly.

consumerKey <- "[your Twitter consumer key]"
consumerSecret <- "[your Twitter consumer secret]"
accessToken <- "[your Twitter access token]"
accessTokenSecret <- "[your Twitter access token secret]"

setup_twitter_oauth(consumerKey, consumerSecret, accessToken, accessTokenSecret)

这似乎为我工作。不同的OAuth参数来自Twitter的。我写了如何做到这一点的位置:。

This seemed to work for me. The various OAuth parameters come from Twitter. I wrote up how to do that here: Newborn app using Twitter and R.

在完整的R源$ C ​​$ C是到位桶(底部的东西可能是最相关的):<一href=\"https://bitbucket.org/dailymorn/newborn-app/src/8142076bc5db5b34f84b02820cf86b07dbefaa31/newborn-app.R?at=default\"相对=nofollow>新生儿-app.R 。

The complete R source code is on BitBucket (the stuff at the bottom is probably most relevant): newborn-app.R.

这篇关于Twitter的包的R认证:错误401的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 17:26