FBSDKLoginManager logInWithReadPermissions?

I’m using FBSDKLoginButton to allow to user login using Facebook and using
FBSDKLoginButton.readPermissions = @[@"public_profile",@"email",@"user_likes",@"email",@"user_birthday"];

to ask for permissions , but I need one more permission which is publish_actions I should use
FBSDKLoginManager

  • omniauth for rails and ios authentication
  • FacebookDisplayName on iOS with german umlauts
  • iOS facebook check if friends have app installed
  • Facebook iOS Select Friends Table Blank
  • iOS app rejected due to IDFA in Facebook SDK
  • Cannot see like option in facebook page from android device
  • with

     logInWithReadPermissions:@[@"public_profile",@"user_likes",@"user_birthday"] 
    logInWithPublishPermissions:@[@"publish_actions"]
    

    but this for some reason affect on my permission “some of my permission are missing check image

    Code:-

    FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
                    [login logInWithPublishPermissions:@[@"publish_actions"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
                        if (error) {
                            // Process error
                        } else if (result.isCancelled) {
                            // Handle cancellations
                        } else {
                            // If you ask for multiple permissions at once, you
                            // should check if specific permissions missing
                            if ([result.grantedPermissions containsObject:@"publish_actions"]) {
                                // Do work
                            }
                        }
                    }];
    
    [login logInWithReadPermissions:@[@"public_profile",@"",@"user_likes",@"user_birthday"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
        if (error) {
            // Process error
        } else if (result.isCancelled) {
            // Handle cancellations
        } else {
            // If you ask for multiple permissions at once, you
            // should check if specific permissions missing
            if ([result.grantedPermissions containsObject:@"email"]) {
                // Do work
            }
        }
    }];
    

    Result:-

    **it take long time to redirect the user to the permission view ? and not all my permission appear to user **

    enter image description here

    Note:-
    I know that warning mean that i need to submit my app to review but this not what i’m asking about right now .

    Update

    When I Tried “Dheeraj Singh” solution but in this case user will be re-direct twice to the Facebook first time to get publish_action then to get email and birthday permission which is bad.

    4 Solutions Collect From Internet About “FBSDKLoginManager logInWithReadPermissions?”

    Facebook Login provides your app access to a person’s public profile, friend list, and email address. These three permissions do not require review. Instead, your app’s users will choose whether they want to grant access to this information.

    In order for your app to access additional elements of a person’s Facebook profile (read permissions) or to publish content to Facebook on their behalf (write permissions), you will need to submit for review.

    Refer to : https://developers.facebook.com/docs/apps/review#submitlogin

    Updated :

    Apps should separate the request of read and publish permissions.

     FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
    
        [login logInWithPublishPermissions:@[@"publish_actions"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
            if (error) {
                // Process error
            } else if (result.isCancelled) {
                // Handle cancellations
            } else {
                // If you ask for multiple permissions at once, you
                // should check if specific permissions missing
                if ([result.grantedPermissions containsObject:@"publish_actions"]) {
                    // Do work
    
                    [login logInWithReadPermissions:@[@"user_likes",@"user_birthday"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
                        if (error) {
                            // Process error
                        } else if (result.isCancelled) {
                            // Handle cancellations
                        } else {
                            // If you ask for multiple permissions at once, you
                            // should check if specific permissions missing
                            if ([result.grantedPermissions containsObject:@"user_birthday"]) {
                                // Do work
    
                                NSLog(@"Permission  2: %@",result.grantedPermissions);
                            }
                        }
                    }];
    
                }
            }
        }];
    

    You don’t need public_profile in read permission as if granted permission to publish_actions it also gets permission for public_profile.

    As i seen you code that you are trying to use the “user_likes“, “user_birthday“, “public_profile” and “publish_actions” permissions.

    From 1st May 2015 facebook has only enabled “public_profile“, “email” and “user_friends” are available without the approval process.

    For “user_likes“, “user_birthday” and “publish_actions” you need to get approval from the facebook.

    For review process you can get help from Facebook Review.

    I also have the same issue with user_posts permission for two weeks, but after some search i found the solution for this, if you still having this issue follow these steps

    1. Go to http://developers.facebook.com and logged in to your developer account.
    2. Select your app and go to Roles section.
    3. Add a tester in Testers section.
    4. Then re-install the app and login using that tester account.
    5. Now you try to get the required permissions from tester and tester will see all the permissions list.
    var login = FBSDKLoginManager()
    
    
    @IBAction func fbBtnPressed(_ sender: AnyObject) {
    
        login.logIn(withReadPermissions: ["email"], from: self) { (FBSDKLoginManagerLoginResult, Error) in
    
            if Error != nil {
                print("O Login via Facebook Falhou. Erro: \(Error)")
            } else {
                let accessToken = FBSDKAccessToken.current().tokenString
                self.gotoScreen() //Function for screen after login succesfull 
                print("Acesso concedido ao Facebook. \(accessToken)")
            }
    
        }
    
    }