简体   繁体   English

Android Twitter4j 401身份验证错误

[英]Android Twitter4j 401 Authentication error

I'm using the AndroidTwitter project at https://github.com/lorensiuswlt/AndroidTwitter to connect to Twitter and send a tweet. 我正在使用https://github.com/lorensiuswlt/AndroidTwitter上的AndroidTwitter项目连接到Twitter并发送推文。 I can authorize with Twitter successfully, and it says I'm logged in, however when I go to post a tweet, I get this error. 我可以通过Twitter成功授权,并且说我已经登录,但是当我发布推文时,出现此错误。 The system time is correct on the Android device, and my oauth key and secret are filled out (No problems when logging in). 系统时间在Android设备上正确,并且我的oauth密钥和机密信息已填写(登录时没有问题)。

08-01 14:25:07.222: W/System.err(5527): 401:Authentication credentials (https://dev.twitter.com/docs/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
08-01 14:25:07.222: W/System.err(5527): error - Could not authenticate with OAuth.
08-01 14:25:07.222: W/System.err(5527): request - /1/statuses/update.json
08-01 14:25:07.222: W/System.err(5527): Relevant discussions can be found on the Internet at:
08-01 14:25:07.222: W/System.err(5527):     http://www.google.co.jp/search?q=b2b52c28 or
08-01 14:25:07.222: W/System.err(5527):     http://www.google.co.jp/search?q=1a591522
08-01 14:25:07.222: W/System.err(5527): TwitterException{exceptionCode=[b2b52c28-1a591522],     statusCode=401, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=3.0.0-SNAPSHOT(build: a5aafcad15add0fbc7a6583e337a1abbafa23435)}
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:176)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.TwitterImpl.post(TwitterImpl.java:1970)
08-01 14:25:07.237: W/System.err(5527):     at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:415)
08-01 14:25:07.237: W/System.err(5527):     at net.londatiga.android.TwitterApp.updateStatus(TwitterApp.java:106)
08-01 14:25:07.237: W/System.err(5527):     at net.londatiga.android.TestPost$5.run(TestPost.java:106)

If you've just set it up, your twitter app is probably still set to read-only. 如果您刚刚进行设置,则您的Twitter应用程序可能仍设置为只读。 Check your app's application type in the twitter settings console. 在Twitter设置控制台中检查您的应用程序的应用程序类型。 Make sure you re-generate your access tokens after changes. 确保更改后重新生成访问令牌。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM