Authorize Failed when logging in with Unity SDK

twitterkit
unity

#1

Just switched from Fabric to the standalone twitterkit and am getting an Authorize Failed error everytime I try to authorize the app. I click authorize and it returns to my app with the error. I’ve seen a few similar topics around the web but they all seem to be with native android apps, is there a fix for this issue using the Unity SDK? Here’s callstack from logcat:

08-23 11:01:36.436 13329 13329 W Twitter : Authorize already in progress
08-23 11:01:36.436 13329 13329 W Twitter : Authorize already in progress
08-23 11:01:36.487 13329 13329 E Twitter : Authorization completed with an error
08-23 11:01:36.487 13329 13329 E Twitter : com.twitter.sdk.android.core.TwitterAuthException: Authorize failed.
08-23 11:01:36.487 13329 13329 E Twitter : at com.twitter.sdk.android.core.identity.TwitterAuthClient.handleAuthorize(TwitterAuthClient.java:112)
08-23 11:01:36.487 13329 13329 E Twitter : at com.twitter.sdk.android.core.identity.TwitterAuthClient.authorize(TwitterAuthClient.java:103)
08-23 11:01:36.487 13329 13329 E Twitter : at com.twitter.sdk.android.unity.LoginActivity.onCreate(LoginActivity.java:42)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.Activity.performCreate(Activity.java:6682)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4520)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread.-wrap19(ActivityThread.java)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1484)
08-23 11:01:36.487 13329 13329 E Twitter : at android.os.Handler.dispatchMessage(Handler.java:102)
08-23 11:01:36.487 13329 13329 E Twitter : at android.os.Looper.loop(Looper.java:154)
08-23 11:01:36.487 13329 13329 E Twitter : at android.app.ActivityThread.main(ActivityThread.java:6121)
08-23 11:01:36.487 13329 13329 E Twitter : at java.lang.reflect.Method.invoke(Native Method)
08-23 11:01:36.487 13329 13329 E Twitter : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
08-23 11:01:36.487 13329 13329 E Twitter : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)


#2

I assume you followed all the instructions here https://dev.twitter.com/twitterkit/unity/installation ?
If so, have you tried running the TwitterDemo scene included with the Twitter Kit for Unity SDK?


#3

I did follow the instructions, haven’t tried the test app yet. All the code was brought over from the previously working twitterkit implementation through fabric. Will try test scene.


#4

Tried the test scene. It gets me to the same steps(click connect -> authenticating -> back to app) but then the app crashes.


#5

Tried revoking auth for the app in my twitter account settings and reinstalled the twitter app and after that auth started working.