Question

i am using Twitter framework (iOS-5 and iOS-6 ) to get user details but i need user email id to be able to log in in my system. I have seen many post regarding this like

link1

link2

and i have also checked twitter reverse api here

but it is giving me only auth tokens.

Can someone please confirm me that we can't get user email from twitter or i am not been able to figure it out. Already i have wasted my lots of time searching for this please help.

Thanks

Was it helpful?

Solution

You certainly can't get user email from Twitter.

OTHER TIPS

You can get Email from Twitter now.

  1. First you need to get permission to access user-email from Twitter. In order to do that fill out this form. Ask for special permission and permission required is 'Email'. Once Twitter grants permission(They will send an email regarding this), goto next step.

  2. Please follow this link from Fabric: Fabric

// Objective-C

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)
}

// Swift

if Twitter.sharedInstance().session {
  let shareEmailViewController = TWTRShareEmailViewController() { email, error in
    println("Email \(email), Error: \(error)")
  }
  self.presentViewController(shareEmailViewController, animated: true, completion: nil)
} else {
  // TODO: Handle user not signed in (e.g. attempt to log in or show an alert)
}

It is now possible using Fabric SDK and these steps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top