Hi @Bonnel,
Hope you will be fine…!
I am here to say Thank you for your response, I have seen your email in which you said that all permissions are set. I appreciate it.
But I am sorry to say that I am still unable to get the Email. 
Now I will explain my complete procedure, may be you will understand my problem.
The Complete Procedure:-
"Basically, I am using a twitter app, created by another person. He created the twitter app on apps.twitter.com.
He is using the app for android and I am using his app consumer key and consumer secret in my iPhone app.
He is getting the email successfully , but I am not.
Now Actually, I have integrated the twitter integration in my iPhone app using Fabric following this tutorial:
https://fabric.io/kits/ios/twitterkit
In this tutorial, it is mentioned that add the following code into your app info.plist file as show in this screenshot:
https://cloudup.com/c5GTYGNFhf1
Now My First problem is that:
I have pasted the consumer key and consumer secret in my info.plist file which I got from my Android friend, These are the keys of the Twitter App created at apps.twitter.com.
This is my code of info.plist file:
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>redacted</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict>
<key>consumerKey</key>
<string>redacted</string>
<key>consumerSecret</key>
<string>redacted</string>
</dict>
<key>KitName</key>
<string>Twitter</string>
</dict>
</array>
</dict>
I have also pasted these keys in AppDelegate.m file as below:
[[Twitter sharedInstance] startWithConsumerKey:@“redacted” consumerSecret:@“redacted”];
[Fabric with:@[[Twitter class]]];
Now my 2nd Question is that:
-
Fabric also have consumer key and consumer secret key, In my app, where should I place these keys generate by Fabric. ???
Please see the screenshot: https://cloudup.com/c2Av8u5hbtx
Currently I am only using the Consumer key and Consumer Secret of the Twitter app created at apps.twitter.com.
I have also checked the Request email addresses from users box under the Permission tab.
Please see the screenshot:- https://cloudup.com/cBtfzrk1YYO
Finally,
this is my code, when login with Twitter button is pressed…!
[[Twitter sharedInstance] logInWithCompletion:^
(TWTRSession *session, NSError *error) {
if (session) {
[[[TWTRAPIClient alloc]init] loadUserWithID:[session userID] completion:^(TWTRUser* _Nullable user , NSError *_Nullable error){
TWTRAPIClient *client = [TWTRAPIClient clientWithCurrentUser];
NSURLRequest *request = [client URLRequestWithMethod:@"GET"
URL:@"https://api.twitter.com/1.1/account/verify_credentials.json"
parameters:@{@"include_email": @"true", @"skip_status": @"true"}
error:nil];
[client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
if (connectionError) {
NSLog(@"error: %@",connectionError.localizedDescription);
}
else{
NSLog(@"success");
}
}];
}];
Response:
And I am getting the following response:-
<NSHTTPURLResponse: 0x7fb0f39532b0> { URL: https://api.twitter.com/1.1/account/verify_credentials.json?skip_status=true&include_email=true } { status code: 200, headers {
“Cache-Control” = “no-cache, no-store, must-revalidate, pre-check=0, post-check=0”;
"Content-Disposition" = "attachment; filename=json.json";
"Content-Encoding" = gzip;
"Content-Length" = 548;
"Content-Type" = "application/json;charset=utf-8";
Date = "Thu, 01 Dec 2016 12:11:09 GMT";
Expires = "Tue, 31 Mar 1981 05:00:00 GMT";
"Last-Modified" = "Thu, 01 Dec 2016 12:11:09 GMT";
Pragma = "no-cache";
Server = "tsa_o";
Status = "200 OK";
"Strict-Transport-Security" = "max-age=631138519";
"x-access-level" = "read-write-directmessages";
"x-connection-hash" = af6c8e28d7c91c917ed2719d868c89d4;
"x-content-type-options" = nosniff;
"x-frame-options" = SAMEORIGIN;
"x-rate-limit-limit" = 75;
"x-rate-limit-remaining" = 73;
"x-rate-limit-reset" = 1480594514;
"x-response-time" = 139;
"x-transaction" = 007d638800a56ec2;
"x-twitter-response-tags" = "BouncerExempt, BouncerCompliant";
"x-xss-protection" = "1; mode=block";
} }
The response says that it is success, but it contains no email of the user. Now that is the issue.
I hope you understand what is my real problem is ???
Please guide me in the right direction. I really appreciate your response…!
Thanks…!