我在使用Twitter4J从Android中的java代码更新我的推特状态时遇到以下错误。
任何帮助都将受到赞赏.....
09-18 11:34:50.476: WARN/System.err(755): TwitterException{exceptionCode=[15bb6564-00e4d61f], statusCode=401, retryAfter=0, rateLimitStatus=null, version=2.1.5-SNAPSHOT(build: d372a51b9b419cbd73d416474f4a855f3e889507)}
09-18 11:34:50.476: WARN/System.err(755): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:308)
09-18 11:34:50.496: WARN/System.err(755): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:72)
09-18 11:34:50.496: WARN/System.err(755): at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:103)
09-18 11:34:50.496: WARN/System.err(755): at twitter4j.Twitter.updateStatus(Twitter.java:500)
09-18 11:34:50.496: WARN/System.err(755): at com.android.twitterTest.twitterTest.postUpdate(twitterTest.java:115)
09-18 11:34:50.510: WARN/System.err(755): at com.android.twitterTest.twitterTest$1.onClick(twitterTest.java:50)
09-18 11:34:50.510: WARN/System.err(755): at android.view.View.performClick(View.java:2408)
09-18 11:34:50.510: WARN/System.err(755): at android.view.View$PerformClick.run(View.java:8816)
09-18 11:34:50.510: WARN/System.err(755): at android.os.Handler.handleCallback(Handler.java:587)
09-18 11:34:50.536: WARN/System.err(755): at android.os.Handler.dispatchMessage(Handler.java:92)
09-18 11:34:50.536: WARN/System.err(755): at android.os.Looper.loop(Looper.java:123)
09-18 11:34:50.536: WARN/System.err(755): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-18 11:34:50.536: WARN/System.err(755): at java.lang.reflect.Method.invokeNative(Native Method)
09-18 11:34:50.536: WARN/System.err(755): at java.lang.reflect.Method.invoke(Method.java:521)
09-18 11:34:50.536: WARN/System.err(755): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-18 11:34:50.536: WARN/System.err(755): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-18 11:34:50.536: WARN/System.err(755): at dalvik.system.NativeStart.main(Native Method)
09-18 11:34:50.596: INFO/Exception(755): TwitterException{exceptionCode=[15bb6564-00e4d61f], statusCode=401, retryAfter=0, rateLimitStatus=null, version=2.1.5-SNAPSHOT(build: d372a51b9b419cbd73d416474f4a855f3e889507)}
09-18 11:36:38.517: DEBUG/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol
09-18 11:41:38.527: DEBUG/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol
09-18 11:42:49.207: DEBUG/ThrottleService(60): onPollAlarm - roaming =false, read =0, written =0, new total =0
09-18 11:46:38.530: DEBUG/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol
答案 0 :(得分:2)
每https://apiwiki.twitter.com/HTTP-Response-Codes-and-Errors:status code 401
表示身份验证凭据丢失或不正确。确保您通过OAuth成功连接。
答案 1 :(得分:0)
我遇到了同样的问题。但退出然后再次登录对我有用。现在我的应用程序正在运行,错误被删除。