Unable to get email when using SystemAccounts on iOS




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?

    [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]];
                NSLog(@"Twitter authentication failed.");
            [AnimatedUIBlockingView unblockUI];


I moved this to the correct category so that the Twitter Kit folks will see it!


Sorry, we don’t support requesting email using the system account, since there is no UI informing user we are sharing their email. See: https://docs.fabric.io/apple/twitter/log-in-with-twitter.html#request-user-email-address for the alternative (Twitter Kit) way to do this via the web-based OAuth flow.