Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "rerequest" email permission using Facebook iOS SDK 3.21.1?

Right now my login using Facebook button's tap action maps to the following method:

- (void)openFacebookSession
{
    [FBSession openActiveSessionWithReadPermissions:@[@"public_profile", @"user_friends", @"email"] allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
        [self sessionStateChanged:session state:state error:error];
    }];
}

This works great unless the user denies access to "email". I see in the FB docs that I can re-request access to the user's email one time. According to the FB docs:

If someone has declined a permission for your app, the login dialog won't let your app re-request the permission unless you pass auth_type=rerequest along with your request.

How do I pass "auth_type=rerequest" to Facebook's servers via the iOS SDK? Is there a special method for that?

like image 849
John Erck Avatar asked Dec 11 '25 21:12

John Erck


1 Answers

You can just call the [FBSession requestNewReadPermissions:completionHandler:] method. It will automatically add the rerequest auth_type for you.

like image 196
Ming Li Avatar answered Dec 14 '25 11:12

Ming Li



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!