2

I'm having difficulty using the Rtweet package. I've already got twitter API approval and my R script is not working the function:

twitter_token <- create_token(app = appname, consumer_key = key, consumer_secret = secret)

This message always appears:

Error in twitter_init_oauth1.0(self$endpoint, self$app, permission = self$params$permission,  : 
  Unauthorized (HTTP 401)

I've already tried to use the solution they left in another publication but I believe that twitteR is different from Rtweet, the script they indicated to solve it would be:

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)

Any idea what this could be and how could I get around it? Thank you in advance if anyone can help me, good night.

0 Answers0