Not Getting Email Id from fabric twitter

ios
email

#1

Hi, I am using Fabric Desktop app for integrating Twitter in iOS app. Fabric has generated the following keys:
Consumer Key (API Key)
Consumer Secret (API Secret)
Client Application ID
, I have also whit listed the email id from twitter representative ,

I have used these methods for accessing Email Id
First One :-
/*
TWTRAPIClient.clientWithCurrentUser().requestEmailForCurrentUser({ (email, emailError) in**
print(“Email Fetched (email) , Error is (emailError)”)**
})
*/
from this method I am getting this Error

/*
Email Fetched nil , Error is Optional(Error Domain=TWTRErrorDomain Code=3 “This user does not have an email address.” UserInfo={NSLocalizedDescription=This user does not have an email address.})
*/

Second Method
/*
let rquest = TWTRAPIClient.clientWithCurrentUser().URLRequestWithMethod(“GET”, URL: “https://api.twitter.com/1.1/account/verify_credentials.json”, parameters: [“include_email” : “true”,“skip_status” : “false”], error: nil)
TWTRAPIClient.clientWithCurrentUser().sendTwitterRequest(rquest, completion: { (reponse, data, connectionError) in
do {
let json = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.AllowFragments) as! NSDictionary
print("(json)")
}
catch let error as NSError {
print(“failed with error (error.localizedDescription)”)
}

*/
This method also doesn’t shown any email Address:-

what should be done?


#2

This would usually indicate that a user hasn’t confirmed an email address that is associated with their account, OR that they may have denied your app access to their email address. Are you sure you’re logging in and getting a fresh user token with the new permissions applied? (per the email from platform operations, this only works for new sign-ins).


#3

This user has email id .
I have also created a new user and confirmed it . Plz Give any solution for this ???


#4

Hey @akusticmusic,

I’d love to dig into this more by checking out any issues with the keys you’re using and the user you’re testing with. Can you email me, Mike - at support(at)fabric(dot)io referencing this thread and send over the Twitter Consumer Key you’re using in your info.plist or app’s delegate, the user’s email address/Twitter account you’re testing with and the bundle id of the app?

Thanks! We’ll get to the bottom of this :slight_smile:
-Mike