twitteR package for R authentication: error 401

前端 未结 1 1475
攒了一身酷
攒了一身酷 2021-01-14 20:30

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

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 21:04

    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.

    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)
    

    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.

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

    0 讨论(0)
提交回复
热议问题