I am developing an iOS App and want to request a user to share his/her email address. I have used Twitter kit framework for authenticating user. That part of my App has been done successfully. Now, I want to request user email. I have referred to Twitter developers documentation telling me to visit a form to get information to get my App white-listed. In that form, I couldn’t found an option for requesting a user’s email.
So, I need some guidance for the process for achieving this. Twitter should have given a straight forward information about this.
Finally, after having a long conversation with [email protected]
, I got my App whitelisted. Here is the story:
Send mail to [email protected]
with some details about your App like Consumer key, App Store link of an App, Link to privacy policy, Metadata, Instructions on how to log into our App. Mention in mail that you want to access user email address inside your App.
They will review your App and reply to you within 2-3 business days.
Once they say that your App is whitelisted, update your App's settings in Twitter Developer portal. Sign in to apps.twitter.com and:
It's time to code:
-(void)requestUserEmail
{
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 {
// Handle user not signed in (e.g. attempt to log in or show an alert)
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With