Whitelisted App Still Unable to Access Emails. Please Help

ios
login

#1

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!


#2

Hey Dallas, just to check- have you already signed in to apps.twitter.com then:

  1. On the ‘Settings’ tab, added a terms of service and privacy policy URL
  2. On the ‘Permissions’ tab, changed your token’s scope to request email?

#3

Affirmative.

Checked the check box, and entered valid links to my privacy policy and TOS.
(do they perhaps have to be https links? The ones I entered were not, but nothing said they needed to be and it took them fine)

Thanks for the response, I was starting to feel abandoned :smile:


#4

Hm, and you re-logged in the user with the new permissions? I’m wondering if the line that checks for a valid session is using an older one from before your key was upgraded. If not, send us more details, including your key to support [at] fabric.io and we can take a closer look.


#5

I have tried completely removing the app and making sure the user is logged out.
Same thing.

What details would you like when you say to send “more details”?
Also what key would you like?
I have an API key in my info.plist under a Fabric keyword dictionary but it doesn’t seem to match any of the API keys listed at apps.twitter.com or fabric.io, yet if I update it with any of the ones listed on those pages I get a lot more errors.
And the Fabric API. The Twitter ones don’t seem to be used anywhere.


#6

The Fabric API key should match the one at fabric.io/settings/organizations - if you select your org and click to reveal the API key, that should be consistent.

The keys I meant were your Twitter consumer key and secret, which should also be in the Fabric dictionary inside your plist - Fabric -> Kits -> Item -> KitInfo -> consumerKey/consumerSecret

Let’s start with that, and we can keep digging!


#7

I sent an email over the weekend and asked that it be directed your way.
Thanks!


#8