I am following the latest update on twitteR homepage, and I can't pass the authorization process.
library(devtools)
install_github("twitteR", username="geoffjentry")
library(twitteR)
api_key <- "XXXXXXXXXXXXXXXXX"
api_secret <- "XXXXXXXXXXXXXXXXX"
access_token <- "XXXXXXXXXXXXXXXXX"
access_secret <- "XXXXXXXXXXXXXXXXX"
setup_twitter_oauth(api_key, api_secret, access_token, access_secret)
This is the output I am getting back:
[1] "Using direct authentication"
Error in check_twitter_oauth() : OAuth authentication error:
This most likely means that you have incorrectly called setup_twitter_oauth()'
I have also tried setup_twitter_oauth(api_key, api_secret)
, and this is the error message:
[1] "Using browser based authentication"
Error in init_oauth1.0(endpoint, app, permission = params$permission) :
client error: (401) Unauthorized
I don't think there are any other options in setup_twitter_oauth
. Does anyone else encounter this error?
try
install.packages('base64enc')
. it worked for me. found it in github discussion.I encountered the same error: "Error in check_twitter_oauth() : OAuth authentication error: This most likely means that you have incorrectly called setup_twitter_oauth()'" and after trying the different solutions posted here in the stackoverflow, I still did not get the problem solved. I have regenerated my consumer key and consumer secret and supplied it to the following lines in my R script:
What I did to get it right and get the OAuth authentication handshake is to supply the twitter supplied consumer key, consumer secret, access token, access secret value directly to the 5th line above, that is,
This works for me and hope it will for you.
I had the same problem. Tried all the suggestions I found on the net but in vain.
Probably it has to do with the Callback URL, I had skipped it earlier.
Created a new app, this time included it - http://127.0.0.1:1410 and it worked for me.
Here is the code I used:
Hope it helps.
I got it fixed by manually generating access token at apps.twitter.com site and pass that as argument to the api which will force to use local authentication rather than browser authentication.
I faced the same problem and tried all latest httr download and libraries but still the problem was there. Then I created a new APP in twitter and used API keys and other credentials in the code and now the problem solved. I was using an APP which i created 8 months back ....regenerating the API credentials may also solve for the existing APP.
I have tried setting call back URL to ( http://127.0.0.1:1410 ), updating all packages related to this package. Nothing solved my problem. then i installed httk httpuv packages and did the lines below:
It worked like a beauty.
Doing the above takes to a web page and you manually authorize the app. While this may not be the solution to the question, it is definitely a workaround to the authentication roadblock.