From last 5 days I am search for a best working pice of code for twitter in android using OAuth... I found a lot. But not a single 1 is running perfectly. Any how i get some code. Its working but I have a problem. I am wondring what I have to write in String callBack = "?" so that my android browser redirect me to my application back instead of staying there after authentication.. If I am not using a CallBack and use OAuth.OUT_OF_BAND then browser show a pin code and dose not redirect browser back to my application. Please Help me to let me know what I am doing wrong.

I try this to but still no solution...! It always show error oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match. 01-10 16:53:20.614: WARN/System.err(5447): at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:239) 01-10 16:53:20.614: WARN/System.err(5447): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
– ArslanJan 10 '11 at 12:04

I've taken a closer look at your code. I can see a couple of potential issues: - Message signer: Set with "consumer.setMessageSigner(new HmacSha1MessageSigner());" - retrieving the access token. Use "OAuth.OAUTH_VERIFIER" for the verifier (although this is probably the same thing.
– ShibbyUKJan 10 '11 at 12:22

Thanks for consideration.... But where to put this code? Message signer: Set with "consumer.setMessageSigner(new HmacSha1MessageSigner());"
– ArslanJan 10 '11 at 12:59