Alexi
Alexi

Reputation:

Android Twitter with oauth-signpost error Authorization failed (server replied with a 401)

Hello im tryin to use Twitter with OAuth but i receive this exception

Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.

im using this sample http://code.google.com/p/oauth-signpost/wiki/TwitterAndSignpost

Error Line: String authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);

Upvotes: 4

Views: 4772

Answers (3)

xnagyg
xnagyg

Reputation: 4931

You have to enable Callback URL on Twitter app settings (https://apps.twitter.com/app/123456/settings)

type into Callback URL: http://www.google.com /whatever/

And tada!

Upvotes: 2

Megha
Megha

Reputation: 1581

i have the same error same consumer Key and secreat key is working in iphone but when i set this to my android app it dispaly this error message. Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.

Upvotes: -1

Jorgesys
Jorgesys

Reputation: 126563

this will not happen only for this reason ::

Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.

another reason is ::

your Device date and time are incorrect.

Upvotes: 7

Related Questions