0

I am using facebook sdk 3.14 and requesting user forpublic profile, email, user_photos permissions. I am using email for login purpose. If user denies email during login , there is no way to ask it back. But i have seen apps like Airbnb and Zomato returning user back to permissions page unless all the reuired permissions are given by the user.

Is there a way in which i can re-request the user for permissions that were not granted during the login process.

I am using the below code for requesting the permissions

        [FBSession openActiveSessionWithReadPermissions:@[@"public_profile",@"email",@"user_friends",@"user_photos"]
                                       allowLoginUI:YES
                                  completionHandler:
     ^(FBSession *session, FBSessionState state, NSError *error) {

         // Retrieve the app delegate


         if(error.code ==2 && [errorReason isEqualToString:@"com.facebook.sdk:UserLoginCancelled"]){
             [facebookWebobj performSelector:@selector(hideAnimatedLoader) withObject:nil afterDelay:0.5];
         }
         else
         {
         // get email id and login the user
         }

     }];
A for Alpha
  • 2,904
  • 8
  • 42
  • 76

0 Answers0