Obtain access token from twitter app for oauth

561 Views Asked by At

Instead of showing webview for user to enter login and password I want to make users authorize with their official twitter app (if you know, facebook api does the same - if there is installed facebook application it runs this application which returns access token).

So, maybe there are any intents for twitter application to do the same? (obtain the access token from twitter app for oauth to authorize the user in my own application)

1

There are 1 best solutions below

1
On

What you can do is parsing the HTML file you receive and taking the informations that you need (oauth_verifier, authenticity_token and the text of the button where you clicked not to authorize the app). To send the user's credentials in order to authorize the app, post the credentials and the information you took from the HTML page via the POST oauth/authorize endpoint (undocumented on Twitter Developers). Don't hesitate to watch what the authentication with the HTML page does with tools like Firebug or Opera Dragonfly (depending on the browser you use to do this).