twitter-archive / twitter-kit-ios

Twitter Kit is a native SDK to include Twitter content inside mobile apps.
Apache License 2.0
688 stars 449 forks source link

Unable to login from iOS 11.4.1 #84

Open MAmmarShahid opened 6 years ago

MAmmarShahid commented 6 years ago

i downloaded the latest repo with pod and setup according to docs. i wasn't able to call login from twitter though i was able to search timeline etc. i set up twitter like this:

// Info.plist

CFBundleURLTypes CFBundleURLSchemes twitterkit-myConsumerKey LSApplicationQueriesSchemes twitter twitterauth

Expected behavior

Should have been able to login to twitter after setting api sercret and api key.

Actual behavior

xcode is throwing this error "Twitterkit 3.0 'TWTRInvalidInitializationException' error in ios "

Steps to reproduce the behavior

download twitter kit 3.4.0 from pod. do all installation setups. add the following code in view controller view did load method: TWTRLogInButton logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession session, NSError *error) { if (session) { NSLog(@"signed in as %@", [session userName]); } else { NSLog(@"error: %@", [error localizedDescription]); } }]; logInButton.center = self.view.center; [self.view addSubview:logInButton];