PFFacebookUtils logInInBackgroundWithReadPermissions error 304

I link parse.com to facebook: I allow my users to login with their facebook account. When they click "login with facebook", I use the [PFFacebookUtils logInInBackgroundWithReadPermissions ...] function.

However, sometimes when using logInInBackgroundwithReadPersmissions, I get a "weird" error.code = 304 as an argument in the called block (and the user argument supplied to the block is zero).

This is my code:

[PFFacebookUtils logInInBackgroundWithReadPermissions:@[@"email", @"user_birthday"] block:^(PFUser *user, NSError *error) {
    if (!user) {
        if (! error) {
            NSLog(@"The user cancelled the Facebook login.");
        }
        else {
            //error 304 = FBSDKLoginUserMismatchErrorCode
            if(error.code==304) {
            ***what to do here???***
            }
           NSLog(@"Login failed, please try again")
        }

    }

      

As soon as this error occurs, it keeps happening, which means every time logInInBackgroundWithReadPermissions is called (if the user tries to login again by clicking "login with facebook" again) his error is 304. And it continues ...

I found that 304 means FBSDKLoginUserMismatchErrorCode and that I have to log out of "Facebook" see here: https://github.com/facebook/facebook-ios-sdk/issues/713

However, I am using Parse integration and not directly api-api, how should I handle this error?

+3


source to share





All Articles