I\'m trying to use OAuth in an Android app. I have it working correctly but have sometimes run into a problem during the authentication phase. In Android, I launch the brows
You only need to persist consumer.getToken()
and consumer.getTokenSecret()
Later you can simply recreate a new consumer(customerKey,customerKeySecret)
and consumer.setTokenWithSecret(token, tokenSecret)
What was tricky is to find out was the following:
Use CommonsHttpOAuthConsumer
and CommonsHttpOAuthProvider
(on android) the DefaultOAuthProvider
will not work.
When using HttpURLConnection
, you cannot sign POST
requests that carry query parameters in the message payload