I've registered my app on the Twitter Developers site and got some OAuth credentials (Consumer Key, Consumer Secret, Request token URL etc).I have left the callback url blank.App is developed for both IOS and Android.Without callback url app is working in IOS but not working in android.When I have tried
requestToken = twitter
.getOAuthRequestToken(Constants.TWITTER_CALLBACK_URL);
I got the exception as
02-28 10:52:27.337: W/System.err(666): 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync. 02-28 10:52:27.337: W/System.err(666): 02-28 10:52:27.337: W/System.err(666): 02-28 10:52:27.337: W/System.err(666):
/oauth/request_token 02-28 10:52:27.337: W/System.err(666): Desktop applications only support the oauth_callback value 'oob'
Then I have tried without callback url
requestToken = twitter
.getOAuthRequestToken();
And when I have tried to login I was redirected to a page (still within the web activity) congratulating me that I had granted my app access to my Twitter account and giving me a pin to enter where required and not redirecting to my app.
How can I login to twitter without callback url in Android? Thanks in advance.