OAuthNotAuthorizedException,当在Android应用程序中运行twitter时

时间:2012-07-18 06:14:27

标签: android twitter twitter-oauth android-twitter

我正在开发一个应用程序,我必须从现有代码中创建一个新项目。父项目包含Twitter支持类,Twitter在该应用程序中正常运行。但是在新创建的项目中,Twitter引发了以下错误:

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.

这对我来说很奇怪。 Twitter不起作用。但是,如果我运行旧的代码片段它可以工作...为什么不在新的?当两个项目中的Twitter实现没有区别时。我已在设备上验证了日期/时间..但这不是问题。请帮忙.. ???

1 个答案:

答案 0 :(得分:1)

根据您发布的内容,几乎无法为您提供帮助。我可以提供一些帮助:

首先检查你从twitter获得的密钥(密码和密码)。

检查您的权限(可能是正确的,因为它是来自Twitter的回复)

然后检查您的Auth进程是否正常。即如果请求是正确的,

然后检查auth回调,如果它被正确处理(你的实现如何返回oauth令牌?)。