My app is working on some devices and gives problem on Samsung galaxy ace. And gives 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. But If Consumer key is not correct then why it is working on other devices. Not getting this....
I have check with changing my device date but it's not working.
String url = "";
try {
url = provider.retrieveRequestToken(consumer,
OAUTH_CALLBACK_URL);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url))
.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_NO_HISTORY
| Intent.FLAG_FROM_BACKGROUND);
context.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
Log.e(Common.TAG, "Error during OAUth retrieve request token"+ e);
}
return url;
}
I am using following libs.
1. signpost-commonshttp4-1.2.1.1.jar
2. signpost-core-1.2.1.1.jar
3. signpost-jetty6-1.2.1.1.jar
4. twitter4j-core-2.1.11.jar