Twiiter第三方登录接入跳坑

04-05 19:15:57.704 4204-4204/com.rcplatform.livechat E/Twitter: Invalid json: <?xml version="1.0" encoding="UTF-8"?>
                                                                <hash>
                                                                  <error>Desktop applications only support the oauth_callback value 'oob'</error>
                                                                  <request>/oauth/request_token</request>
                                                                </hash>

                                                                com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
                                                                    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
                                                                    at com.twitter.sdk.android.core.models.SafeListAdapter$1.read(SafeListAdapter.java:45)
                                                                    at com.twitter.sdk.android.core.models.SafeMapAdapter$1.read(SafeMapAdapter.java:45)
                                                                    at com.google.gson.Gson.fromJson(Gson.java:887)
                                                                    at com.google.gson.Gson.fromJson(Gson.java:852)
                                                                    at com.google.gson.Gson.fromJson(Gson.java:801)
                                                                    at com.google.gson.Gson.fromJson(Gson.java:773)
                                                                    at com.twitter.sdk.android.core.TwitterApiException.parseApiError(TwitterApiException.java:111)
                                                                    at com.twitter.sdk.android.core.TwitterApiException.readApiError(TwitterApiException.java:96)
                                                                    at com.twitter.sdk.android.core.TwitterApiException.<init>(TwitterApiException.java:44)
                                                                    at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42)
                                                                    at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
                                                                    at android.os.Handler.handleCallback(Handler.java:739)
                                                                    at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                    at android.os.Looper.loop(Looper.java:148)
                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                 Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
                                                                    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
                                                                    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
                                                                    at com.twitter.sdk.android.core.models.SafeListAdapter$1.read(SafeListAdapter.java:45) 
                                                                    at com.twitter.sdk.android.core.models.SafeMapAdapter$1.read(SafeMapAdapter.java:45) 
                                                                    at com.google.gson.Gson.fromJson(Gson.java:887) 
                                                                    at com.google.gson.Gson.fromJson(Gson.java:852) 
                                                                    at com.google.gson.Gson.fromJson(Gson.java:801) 
                                                                    at com.google.gson.Gson.fromJson(Gson.java:773) 
                                                                    at com.twitter.sdk.android.core.TwitterApiException.parseApiError(TwitterApiException.java:111) 
                                                                    at com.twitter.sdk.android.core.TwitterApiException.readApiError(TwitterApiException.java:96) 
                                                                    at com.twitter.sdk.android.core.TwitterApiException.<init>(TwitterApiException.java:44) 
                                                                    at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42) 
                                                                    at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68) 
                                                                    at android.os.Handler.handleCallback(Handler.java:739) 
                                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                    at android.os.Looper.loop(Looper.java:148) 
                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
04-05 19:15:57.707 4204-4204/com.rcplatform.livechat E/Twitter: Failed to get request token
                                                                com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 401
                                                                    at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42)
                                                                    at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
                                                                    at android.os.Handler.handleCallback(Handler.java:739)
                                                                    at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                    at android.os.Looper.loop(Looper.java:148)
                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
04-05 19:15:57.736 4204-4377/com.rcplatform.livechat D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=2296, _sc=OAuthActivity, _si=2277051219362212956}]
04-05 19:15:57.784 4204-4377/com.rcplatform.livechat V/FA: Activity paused, time: 789890265
04-05 19:15:57.785 4204-4204/com.rcplatform.livechat E/Twitter: Authorization completed with an error
                                                                com.twitter.sdk.android.core.TwitterAuthException: Failed to get request token
                                                                    at com.twitter.sdk.android.core.identity.OAuthController$1.failure(OAuthController.java:95)
                                                                    at com.twitter.sdk.android.core.internal.oauth.OAuth1aService$1.failure(OAuth1aService.java:194)
                                                                    at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42)
                                                                    at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
                                                                    at android.os.Handler.handleCallback(Handler.java:739)
                                                                    at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                    at android.os.Looper.loop(Looper.java:148)
                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值