Facebook Graph API has stopped sending user email

For some reason, Facebook has stopped returning email to the user in the user's JSON. I come back after successful user authentication.

I even upgraded the FacebookSDK for iOS from version 3.6 to v3.8 without any luck. Everything worked fine until a few weeks ago, but was gone. Its just email, all the other properties, that is, DOB, returned just fine. Facebook continues to change its permission system, but I don’t know the recent change that could cause this. Any pointers would be greatly appreciated.

Btw, I'm trying to authenticate with my own FB account that has a valid email associated with it, and I have not changed any privacy settings either.

They also tried to remove the application from the privacy settings on Facebook and re-enable, but still no luck. Here is the code:

[FBSession openActiveSessionWithReadPermissions:@[@"user_about_me", @"user_location", @"user_birthday", @"email"] allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
    switch (status) {
        case FBSessionStateOpen: {
            [[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *user, NSError *error) {
                NSLog(@"User Data: %@", user);      //no email in the json
                NSString *email = user[@"email"];   //obviously returns nil
                //rest of the code
            }];
        }
            break;
        case FBSessionStateClosed:
        case FBSessionStateClosedLoginFailed:
            [FBSession.activeSession closeAndClearTokenInformation];
            break;
        default:
            break;
    }
}];

Screenshot of the Facebook application access page, which clearly shows that I configured it correctly:

enter image description here

Here is the JSON user, I will return in the API callback (I deleted my personal information).

{
    bio = "My Bio";
    birthday = "01/01/1900";
    "first_name" = FN;
    gender = male;
    id = 00000000;
    "last_name" = LN;
    link = "https://www.facebook.com/FBName";
    locale = "en";
    location =     {
        id = 11111111111111111;
        name = "City Name";
    };
    name = "FN LN";
    quotes = "";
    timezone = "0";
    "updated_time" = "2000-00-07T00:00:21+0000";
    username = USERNAME;
    verified = 1;
}
+4
source share
1 answer

, Facebook , , Facebook, , .

, . Facebook, , , .

, :

  • , , Facebook- .

  • Facebook .

  • Facebook , .

  • Facebook .

  • Facebook , , , .

  • , json.

+5

All Articles