当我的android设备中没有Twitter应用程序时,twitter登录就失败了。下面给出了我的错误日志
11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter:无效json: 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter:桌面应用程序只支持oauth_callback值'oob‘11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: 请求令牌11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter:未能得到请求令牌11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: com.twitter.sdk.android.core.TwitterApiException: 401授权要求11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278) 11-24 09:47:54.390 31738-31738/com.nighthub.app Eretrofit.CallbackRunnable.run(CallbackRunnable.java:42) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: retrofit.Platform$Android$2$1.run(Platform.java:142) 11-24 09:47:54.390 31738-31738/com.nighthub.app E/Twitter: at java.lang.Thread.run(Thread.java:818) 11-24 09:47:54.417 > 31738-31738/com.nighthub.app E/Twitter:授权完成时出错11-24 - 09:47:54.417 31738-31738/com.nighstub。app E/Twitter: com.twitter.sdk.android.core.TwitterAuthException:未能获得请求令牌11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: at com.twitter.sdk.android.core.identity.OAuthController$1.failure(OAuthController.java:95) 11-24 09:47:54.417 -31738/com.nighthub.app E/Twitter: at com.twitter.sdk.android.core.internal.oauth.OAuth1aService$1com.twitter.sdk.android.core.Callback.failure(Callback.java:45) (OAuth1aService.java:215) 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: at .failure 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53) 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitterandroid.os.Handler.handleCallback(Handler.java:739) 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: android.os.Handler.dispatchMessage(Handler.java:95) 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: at android.os.Looper.loop(Looper.java:135) 11-24 09:47:54.417 31738-31738/com。推特: android.app.ActivityThread.main(ActivityThread.java:5312) 11-24 09:47:54.417 31738-31738/Twitter: at java.lang.reflect.Method.invoke(本地方法) 11-24 09:47:54.417 31738-31738/com.nighthub.app E/Twitter: at java.lang.reflect.Method.invoke(Method.java:372) 11-24 09:47:54.41731738-31738/com.nighthub.app E/Twitter: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901) 11-24 09:47:54.417 -31738/com.nighthub.app E/Twitter: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
发布于 2016-02-17 06:27:15
选择在设置选项卡中的应用程序,在回调url中输入一些URL (任何有效的url都可以,因为Twitter工具包将覆盖它)
发布于 2017-09-23 16:35:22
我也面临着同样的问题。我通过改变我的twitter应用程序设置来解决这个问题。

发布于 2018-08-23 09:48:18
这是你们正在寻找的解决方案,我面临着同样的问题,我就这样解决了这个问题,根据twitter SDK https://stackoverflow.com/a/51982842/3260396的说法。
https://stackoverflow.com/questions/33885659
复制相似问题