Quantcast
Channel: Twitter Login failed on only latest Twitter app in my android app - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Twitter Login failed on only latest Twitter app in my android app

$
0
0

My App is released on PlayStore, and Twitter Login has been working fine.

But today, I found the Twitter login doesn't work!

My app uses Twitter SDK, not Firebase Auth.

implementation "com.twitter.sdk.android:twitter-core:3.3.0"

The login code is:

TwitterAuthClient.authorize(activity, object : Callback<TwitterSession>() {    override fun success(result: Result<TwitterSession?>) {        // 'authorize' success and `result.data?.authToken` is not null but         // `result.data?.authToken?.token` and `result.data?.authToken?.secret` are null        TwitterCore.getInstance().apiClient.accountService.verifyCredentials(false, false, true).enqueue(object : Callback<User>() {            override fun success(result: Result<User?>) {            }            override fun failure(exception: TwitterException) {                // 403 Error! - com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 403            }        })    }    override fun failure(e: TwitterException) {    }})
  1. If the Twitter App is not installed on the device, the twitter login is processed on Web Browser and there is no problem. (Login Success)
  2. If the old Twitter App is installed on the device, the twitter login is processed on the Twitter app and there is no problem. (Login Success)
  3. If the latest Twitter App is installed on the device(9.54.0-release.0) the twitter login is processed on the Twitter app and the problem occurs (Login Fail)

My app doesn't change anything.I think the latest Twitter app has some problem.But I don't know how handle this.

My co-worker checked this issue too.He had an older version of Twitter app 9.32.0-release.0 on his device.At that time the Twitter login works fine.After he updated the Twitter app to 9.54.0-release.0, the Twitter login doesn't work.


[update]

I created a new sample app and am doing a test.But my new sample app works fine (twitter login works fine!).My released app still doesn't work! (cannot login using twitter).

The official Twitter App(9.54.0-release.0) doesn’t return token information to my released app.But it returns token information to my new sample app.I’m confused.

The two apps are using the same SDK. (implementation com.twitter.sdk.android:twitter-core:3.3.0)And the kotlin codes are identical.And they are using the same customer key and customer secret.

I found that something weird.

The new sample app’s twitter login UI is:enter image description here

But my released app’s twitter login UI is:enter image description here

It doesn’t look the same!Why are they different?

Same SDK, same code, same consumer key/secret!

Could you give me some hints, please?When the second screenshot occurs? What condition? Can I know, please?


Viewing all articles
Browse latest Browse all 3

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>