Twitter4j 401身份验证

编程入门 行业动态 更新时间:2024-10-26 11:16:48
本文介绍了Twitter4j 401身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是code,是造成这个问题。以下是logcat的。我已打印除外。我检查了消费者和密钥多次。任何人都可以摆脱了光线或如何获取有关此问题的详细信息?

我还要提到的是我已经运行在模拟器和真正的手机这个剧本,无论带回相同的logcat

09-21 15:27:25.504:ERROR /的HelloWorld(17680):401:身份验证凭据(dev.twitter/docs/auth)失踪或不正确。请确保您已设置有效的conumer键/秘密访问令牌/秘密,并在同步系统时钟。09-21 15:27:25.504:ERROR /的HelloWorld(17680):无法验证的OAuth签名和令牌09-21 15:27:25.504:ERROR /的HelloWorld(17680):相关讨论可以在Internet上:09-21 15:27:25.504:ERROR /的HelloWorld(17680):www.google.co.jp/search?q=10f5ada3或09-21 15:27:25.504:ERROR /的HelloWorld(17680):www.google.co.jp/search?q=dceba03909-21 15:27:25.504:ERROR /的HelloWorld(17680):TwitterException {异常code = [10f5ada3-dceba039],状态code = 401,retryAfter = -1,rateLimitStatus = NULL,featureSpecificRateLimitStatus = NULL ,版本2.2.4 =}09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:102)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:121)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:276)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在com.blundell.tut.ttt.TweetToTwitterActivity.loginNewUser(TweetToTwitterActivity.java:109)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在com.blundell.tut.ttt.TweetToTwitterActivity.buttonLogin(TweetToTwitterActivity.java:83)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在java.lang.reflect.Method.invokeNative(本机方法)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在java.lang.reflect.Method.invoke(Method.java:521)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.view.View $ 1.onClick(View.java:2077)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.view.View.performClick(View.java:2461)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.view.View $ PerformClick.run(View.java:8890)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.os.Handler.handleCallback(Handler.java:587)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.os.Handler.dispatchMessage(Handler.java:92)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.os.Looper.loop(Looper.java:123)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在android.app.ActivityThread.main(ActivityThread.java:4627)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在java.lang.reflect.Method.invokeNative(本机方法)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在java.lang.reflect.Method.invoke(Method.java:521)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:871)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)09-21 15:27:25.504:ERROR /的HelloWorld(17680):在dalvik.system.NativeStart.main(本机方法)

解决方案

09-21 15:27:25.504:ERROR /的HelloWorld(17680):401:身份验证凭据(HTTPS:/ /dev.twitter/docs/auth)的缺失或不正确。请确保您已设置有效的使用者密钥/秘密访问令牌/秘密

您已经输入错误的消费键或秘密键从微博的创建的应用程序。

请确保你给这两个按键也保证了它是正确的。

有关此进一步参考检查与Android集成 Twitter的

This is the code that is causing the problem. And below is the Logcat. I have printed the exception. I have checked the consumer and secret keys multiple times. Could anyone shed anymore light or how to get more details on this issue?

I should also mention that I have run this script on the emulator and a real phone, both bring back the same logcat

09-21 15:27:25.504: ERROR/HelloWorld(17680): 401:Authentication credentials (dev.twitter/docs/auth) were missing or incorrect. Ensure that you have set valid conumer key/secret, access token/secret, and the system clock in in sync. 09-21 15:27:25.504: ERROR/HelloWorld(17680): Failed to validate oauth signature and token 09-21 15:27:25.504: ERROR/HelloWorld(17680): Relevant discussions can be on the Internet at: 09-21 15:27:25.504: ERROR/HelloWorld(17680): www.google.co.jp/search?q=10f5ada3 or 09-21 15:27:25.504: ERROR/HelloWorld(17680): www.google.co.jp/search?q=dceba039 09-21 15:27:25.504: ERROR/HelloWorld(17680): TwitterException{exceptionCode=[10f5ada3-dceba039], statusCode=401, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.4} 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:102) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:121) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:276) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.blundell.tut.ttt.TweetToTwitterActivity.loginNewUser(TweetToTwitterActivity.java:109) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.blundell.tut.ttt.TweetToTwitterActivity.buttonLogin(TweetToTwitterActivity.java:83) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invokeNative(Native Method) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invoke(Method.java:521) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View$1.onClick(View.java:2077) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View.performClick(View.java:2461) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View$PerformClick.run(View.java:8890) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Handler.handleCallback(Handler.java:587) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Handler.dispatchMessage(Handler.java:92) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Looper.loop(Looper.java:123) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.app.ActivityThread.main(ActivityThread.java:4627) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invokeNative(Native Method) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invoke(Method.java:521) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) 09-21 15:27:25.504: ERROR/HelloWorld(17680): at dalvik.system.NativeStart.main(Native Method)

解决方案

09-21 15:27:25.504: ERROR/HelloWorld(17680): 401:Authentication credentials (dev.twitter/docs/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret

You have entered wrong Consumer Key or Secret Key from your Created Application in Twitter.

Ensure that you gave the two keys also ensure that it is correct.

For Further Reference Check this Integrating Twitter with Android

更多推荐

Twitter4j 401身份验证

本文发布于:2023-11-26 16:43:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634415.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:身份验证   Twitter4j

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!