Hello,
I have an issue whereas if I specify logInWithMethods TWTRLoginMethodWebBased, the secret and auth token received allows my server to retrieve the user’s email address, but if I use TWTRLoginMethodSystemAccounts it does not.
I have followed the procedures to create a new app with email permission and then updated the consumer key and secret in my app from the one originally generated by Fabric.io Twitter kit. As mentioned, when I use TWTRLoginMethodWebBased I’m able to get the email address so I would assume my app is setup properly.
What is missing so that I can benefit from the “cleaner” experience of using signing up with TWTRLoginMethodSystemAccounts so that I can still get access to the user’s email?
+(void)login
{
[AnimatedUIBlockingView blockUI];
[[Twitter sharedInstance] logInWithMethods:TWTRLoginMethodSystemAccounts completion:^(TWTRSession *session, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
NSString *message = [NSString stringWithFormat:@"@%@ logged in! (userID: %@)",
[session userName], [session userID]];
NSLog(@"%s %@", __PRETTY_FUNCTION__, message);
NSLog(@"%s authToken: %@", __PRETTY_FUNCTION__, [session authToken]);
NSLog(@"%s authTokenSecret: %@", __PRETTY_FUNCTION__, [session authTokenSecret]);
if( nil == error && nil != session )
{
[self completeServerRegistrationUsingTwitterToken:[session authToken] secret:[session authTokenSecret]];
}
else
{
NSLog(@"Twitter authentication failed.");
}
[AnimatedUIBlockingView unblockUI];
});
}];
}