Start a new topic
Answered

Can't login with facebook in ios10

I have an app which have the option to login with facebook credentials and it works fine on iOS 9. However, it does not work in ios10. I always get the error 308 after enter the facebook credentials and hit done.


Has this something to do with facebook sdk or kinvey sdk? I am using the newest version of both.


Thanks in advance


Best Answer

1.40.9 Kinvey but now downloading 3.3.0 to check if the problem gets solved.


I'm not getting the same errors. The problem with facebook SDK is the new feature on Xcode 8 I think, just enabling Keychain on target capabilities worked for me


1 person has this question

It worked for me too! Thank you Sandor! You saved my life!!! 

Regards


1 person likes this

I solved the problem with facebook SDK but now Kinvey doesn't login

You have to enable Keychain on your project on xcode to have the fb SDK running

Great, thank you!

Sandor,


  • What was your facebook sdk version and kinvey library version?
  • Are you getting the same error as Joao?


Thanks,
Pranav
Kinvey Support

Sure:


This is a custom button (not the plain old default "login with facebook") initialization:


[[self customLoginButton]

    addTarget:self

    action:@selector(loginButtonClicked) forControlEvents:UIControlEventTouchDown];


And this is the method associated with the button:


-(void)loginButtonClicked {

 

    FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];

    [login

    logInWithReadPermissions: @[@"public_profile", @"email", @"user_friends", @"user_birthday", @"user_location", @"user_hometown"]

    fromViewController:self

    handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {

        if (error) {

            NSLog(@"Process error");

        } else if (result.isCancelled) {

            NSLog(@"Cancelled");

        } else {

            NSLog(@"Logged in");

            NSString* acessToken = [[result token] tokenString];

 

            [self didTapLogInWithFB:acessToken];

            [[self customLoginButton] setTitle:@"Logout Facebook" forState:UIControlStateNormal];

        }

    }];

}

Answer

1.40.9 Kinvey but now downloading 3.3.0 to check if the problem gets solved.


I'm not getting the same errors. The problem with facebook SDK is the new feature on Xcode 8 I think, just enabling Keychain on target capabilities worked for me

Joao,

If you keep the same Kinvey version and downgrade the FB SDK does it work for you?

Thanks,
Pranav
Kinvey Support

 

João, can you post the code you're using to log the user in Kinvey using facebook credentials?? I can't manage to do that event login correctly on facebook

Login or Signup to post a comment