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?