Twitter OAuth not working with "Unauthorized" error with call to R
I installed the Twitter app and gave read, write permissions. I noticed the API key and secret. Then I called setup_twitter_oauth () like this:
setup_twitter_oauth("key","secret")
[1] "Using browser based authentication"
Error in init_oauth1.0(self$endpoint, self$app,
permission = self$params$permission) :
client error: (401) Unauthorized
As you can see, the request is rejected as unauthorized. What could be the reason? Please let me know if more information is needed to answer a question.
+3
Venkat Ramakrishnan
source
to share
1 answer
It seems that you are missing some parameters from your call to setup_twitter_oauth
. You need 4 parameters:
consumer_key <- '...'
consumer_secret <- '...'
access_token <- '...'
access_secret <- '...'
setup_twitter_oauth(consumer_key,consumer_secret,access_token,access_secret)
+2
Tim biegeleisen
source
to share