Search code examples
twittertwitter-oauth

Twitter - 3-legged OAuth


I am about to embark on adding a 'post to Twitter' feature on a web application.

It appears 3-legged OAuth is the only option for this. The developer documentation states however that "The user will always be prompted to authorize access to your application, even if access was previously granted."

https://dev.twitter.com/oauth/3-legged

This doesn't seem like a very good experience for the user and confusingly this is not what happens on services like Hootsuite. Have they organised an agreement with Twitter so users don't have to keep authorising the app?


Solution

  • Use the Sign-in With Twitter flow, and store the access token that the user receives when they grant access to your app. Then there's no need to go down the oauth/authorize route every time.