oauth.signpost.exception.OAuthNotAuthorizedException:授权失败,Twitter连接失败

时间:2012-04-03 11:41:48

标签: android-twitter

我的应用程序正在使用某些设备并在三星galaxy ace上出现问题。并给出 错误:oauth.signpost.exception.OAuthNotAuthorizedException:授权失败(服务器回复401)。 如果使用者密钥不正确或签名不匹配,则会发生这种情况。但是如果Consumer键不正确那么它为什么在其他设备上工作。没有得到这个....

我已经检查过更改设备日期,但它无法正常工作。

 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

0 个答案:

没有答案