I am using a custom button to create a twitter login button in my app. the IBAction for that button is:
[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error) {
if (session) {
NSLog(@"signed in as %@", [session userName]);
NSLog(@"userID %@", session.userID);
NSLog(@"userToken %@", session.authToken);
NSLog(@"userSecret %@", session.authTokenSecret);
//code
} else {
NSLog(@"Error: %@", [error localizedDescription]);
}
}];
The issue I am facing is that TwitterKit makes all actions twice: If the user has multiple accounts saved in iOS, it shows the action sheet to select account twice (tapping cancel shows the second open action sheet). If the user has no accounts saved in iOS, it opens the UIWebView for log in also twice. Any suggestions?