我想在安卓应用上发推文。我在 android 中创建应用程序并授予读写权限。我得到令牌和消费者密钥,我写了这段代码:
String token ="<Your access token>";
String secret = "<Your access token secret>";
AccessToken a = new AccessToken(token,secret);
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer("<Your consumer key>", "<Your consumer secret>");
twitter.setOAuthAccessToken(a);
try {
twitter.updateStatus("android test");
} catch (TwitterException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
但它给出了错误:
403:The request is understood, but it has been refused.
An accompanying error message will explain why.
This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
Relevant discussions can be on the Internet at:
http://www.google.co.jp/search?q=b2b52c28
or
http://www.google.co.jp/search?q=1b442886
TwitterException{exceptionCode=[b2b52c28-1b442886], statusCode=403, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.5}
我该如何解决这个问题?