Help! Log In button doesn't work after TwitterKit 3 upgrade


#1

It’s hanging after logging in, showing this:


#2

Yeah, the doc was not updated, you need to add this to your app delegate, so your app know how to handle the Twitter SDK callback.

    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        return Twitter.sharedInstance().application(app, open: url, options: options)
    }

But please Twitter, update the doc… it’ll avoid future headache.


#3

Thank you!


#4

Thanks for the report.

There is a note in the Prerequisites section of of the Log In docs to set up this application:open:options: method.
https://dev.twitter.com/twitterkit/ios/log-in-with-twitter

It links to the full redirect URL docs here:
https://dev.twitter.com/twitterkit/ios/advanced-setup

We will make sure to update our docs to make this more clear. Sorry for the frustration.


#5

Hi,

I’ve got same problem but I have this method implemented.

Twitter.sharedInstance().application() returns false and nothing happens, viewcontroller stay opened.


#6

Hi, having same issue here, same of @namex44. I’ve implemented all and - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options; is returning false always. The ap gets stuck on the screen mentioned above. Do we have a solution for this?

Using TwitterCore (3.1.0)
Using TwitterKit (3.3.0)
Twitter App 7.14

Note:

I’m not using the button, i’m using - (void)logInWithViewController:(nullable UIViewController *)viewController completion:(TWTRLogInCompletion)completion;


#7

I can just advice right now to use TwitterKit below 3.3.0 - which seems a bit too buggy at the moment. I’m going back.