“请求令牌或令牌密钥未在服务器回复中设置。”在尝试获取请求令牌时

时间:2011-05-06 16:56:32

标签: android oauth twitter4j signpost

我正在Android上使用带有Signpost和Twitter4J的Twitter API。

我的代码在这里失败了:

consumer = new CommonsHttpOAuthConsumer(TWITTER_KEY, TWITTER_SECRET);
provider = new DefaultOAuthProvider("https://api.twitter.com/oauth/request_token",
"https://api.twitter.com/oauth/access_token",
"https://api.twitter.com/oauth/authorize");

// Here:
String authUrl = provider.retrieveRequestToken(consumer, CALLBACK);

经过漫长的等待API后,我得到了例外:

  

请求在服务器回复中未设置的令牌或令牌密钥。您使用的服务提供商可能是错误的。

我怀疑这是Twitter的问题,为什么会发生这种情况,我该如何解决呢?

0 个答案:

没有答案