2

我目前正在尝试通过 httr 包与 Twitter 的 Streaming API 进行交互:

library(httr)
my_app <- oauth_app('twitter', consumerKey, consumerSecret)
twitter_token <- oauth1.0_token(oauth_endpoints('twitter'), my_app)

这带来了以下问题和错误:

Use a local file to cache OAuth access credentials between R sessions?
1: Yes
2: No
Selection: 2
Error in init_oauth1.0(endpoint, app, permission = params$permission) : 
  client error: (401) Unauthorized

我该如何解决这个问题?

4

1 回答 1

3

如果您在使用 twitter OAuth 时遇到问题,请首先检查回调 url 是否为http://localhost:1410

于 2015-01-12T19:15:36.207 回答