My app has been whitelisted and according to folks who are over whitelisting apps, who were kind enough to double check my permissions for me, “it has both email requesting and Fabric permissions.”
However when I do the standard Obj-C code provided to request email I always get back:
Error Domain=TwitterAPIErrorDomain Code=37 "Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform." UserInfo={NSLocalizedDescription=Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform.}
These are accounts I know have email addresses associated, and have tried multiple different accounts.
The code I am using is:
twitterLoginButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
NSLog(@“Error: %@”, error);
if (session)
{
NSLog(@"Session AuthToken: %@", session.authToken);
NSLog(@"Session AuthTokenSecret: %@", session.authTokenSecret);
NSLog(@"Session Username: %@", session.userName);
NSLog(@"Session UserID: %@", session.userID);
if ([[Twitter sharedInstance] session])
{
TWTRShareEmailViewController* shareEmailViewController = [[TWTRShareEmailViewController alloc] initWithCompletion:^(NSString* email, NSError* error) {
NSLog(@"Email %@, Error: %@", email, error);
}];
[self presentViewController:shareEmailViewController animated:YES completion:nil];
}
else
{
// TODO: Handle user not signed in (e.g.
// attempt to log in or show an alert)
NSLog(@"ERROR");
}
}
}];
[self.view addSubview:twitterLoginButton];
Any help would be very appreciated!