OAuth authentication error


im university student and my thesis is on twitter data but i face the following error as i use the order " setup_twitter_oauth":
[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 tested different codes but i can’t solve the problem and i even checked my secret key, consumer key, access token and access secret for times but no result
i need your help
thank you


Sorry, but I don’t understand the code or process you’re describing. Can you please share a code sample (without your secret or tokens included) to show us?


yes,surei want to access to tweeter data by using twitter Rpackage for my thesis and textminingso i installed R 3.3.1 and i made twitter application and then i installed twitteR package and used following code for getting authentication:



setup_twitter_oauth(consumer_key,consumer_secret, access_token, access_secret)

but i recieved the error imentioned in the last email, i even used different other codes to get theauthentication but i just recieved different errors

the error:

Error in check_twitter_oauth() : OAuth authentication error:This most likely means that you have incorrectly called setup_twitter_oauth()'
thank you


can’t you help me?


Well, I’m not an expert in R, but I’ve just successfully installed R 3.3.1, installed the twitteR package, and run the setup_twitter_oauth step, so I can’t immediately see the issue here. I didn’t need to install the other packages you mention. I’m passing in the four tokens as strings, which appears to be correct. The documentation appears to suggest that the code should also accept just the consumer key and secret and then direct you in to an auth flow, but that didn’t work for me. The docs also indicate that twitteR is deprecated in favour of rtweet.

It looks like this issue has some additional information and things to check. Is your machine’s clock set correctly?


thank you for giving your time to mei did what you mentioned in your email but again i recieved the same errorcan you introduce anyone to me to be able to answere my question?i really need this data for my thesisthank you


Your best option is probably to ask on the twitteR mailing list or raise an issue on the GitHub project. Alternatively you could try that other R package they point you to. The twitteR package is not maintained by Twitter so you’ll need to find someone more familiar with it to help you.