I want to integrate Twitter with my Android application. Can I do this using OAuth 2.0?
I have searched the internet but couldn't find any good explanation regarding this. If anyone has done this before, can you please guide me through this. I saw in a old post here that Twitter doesn't support OAuth 2.0.
Twitter allows you to obtain user access tokens through the 3-legged OAuth flow, which allows your application to obtain an access token and access token secret by redirecting a user to Twitter and having them authorize your application.
Most of Twitter's Enterprise APIs require HTTP Basic Authentication. This consists of a valid email address and password combination passed as an authorization header for each API request.
OAuth 1.0a allows an authorized Twitter developer App to access private account information or perform a Twitter action on behalf of a Twitter account.
Generating access tokensLogin to your Twitter account on developer.twitter.com. Navigate to the Twitter app dashboard and open the Twitter app for which you would like to generate access tokens. Navigate to the "Keys and Tokens" page. Select 'Create' under the "Access token & access token secret" section.
Basically, no, Twitter still uses OAuth 1.0a for most parts of their backend. Since march however, they support the OAuth 2 client credentials flow for application-only authentication.
This means, if you:
You should check out the Twitter4J library, which abstracts most of the OAuth 1 hassle away from you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With