facebook login ask for Login Review Permission

2.2k views Asked by At

I am using facebook sdk for share status on facebook wall.

but I got message while grant permission.

"submit for login review some of the permissions below have not been approved for use by facebook in ios Submit for Review or learn more"

here is my code.

  - (IBAction)PostStatus:(id)sender
  {
    [self postWithText:self.txtField.text ImageName:nil URL:@"http://developers.facebook.com/ios" Caption:nil Name:nil andDescription:nil];

  }


-(void) postWithText: (NSString*) message
       ImageName: (NSString*) image
             URL: (NSString*) url
         Caption: (NSString*) caption
            Name: (NSString*) name
  andDescription: (NSString*) description
  {

NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                               url, @"link",
                               name, @"name",
                               caption, @"caption",
                               description, @"description",
                               message, @"message",
                               UIImagePNGRepresentation([UIImage imageNamed: image]), @"picture",
                               nil];

if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound)
{
    // No permissions found in session, ask for it
    [FBSession.activeSession requestNewPublishPermissions: [NSArray arrayWithObject:@"publish_actions"]
                                          defaultAudience: FBSessionDefaultAudienceFriends
                                        completionHandler: ^(FBSession *session, NSError *error)
     {
         if (!error)
         {
             // If permissions granted and not already posting then publish the story

                 [self postToWall: params];

         }
     }];
}
else
{
    // If permissions present and not already posting then publish the story
        [self postToWall: params];
}
}

 -(void) postToWall: (NSMutableDictionary*) params
 {
  // m_postingInProgress = YES; //for not allowing multiple hits

[FBRequestConnection startWithGraphPath:@"me/feed"
                             parameters:params
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection,
                                          id result,
                                          NSError *error)
 {
     if (error)
     {
         //showing an alert for failure
         UIAlertView *alertView = [[UIAlertView alloc]
                                   initWithTitle:@"Post Failed"
                                   message:error.localizedDescription
                                   delegate:nil
                                   cancelButtonTitle:@"OK"
                                   otherButtonTitles:nil];
         [alertView show];
     }

 }];
}
3

There are 3 answers

0
Shobhakar Tiwari On BEST ANSWER

Its better to read facebook developer documentation. Facebook clearly mention following :

" If your app asks for more than than public_profile, email and user_friends it will require review by Facebook before your app can be used by people other than the app's developers. The time to review your app is usually about 7 business days. Some extra-sensitive permissions, as noted below, can take up to 14 business days. "

so in your question it is better to share only text and check it works or not.

0
Keyur Akbari On

This is my code to share post in Facebook.

if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {

     SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

                [controller setInitialText:@"your message"];
                [controller addImage:imgSelect.image];//set your image here
                NSLog(@"controller");
                [self presentViewController:controller animated:YES completion:Nil];
}
else{
     UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"No Facebook Account" message:@"There are no Facebook accounts configured. You can add or create a Facebook account in Settings." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Settings", nil];
                [alert show];
}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 1)
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    }
}
1
Kishore Suthar On

When you registered your app to facebook. Facebook provide only three permisson , these permission is by default approved

  1. email Provides access to the person's primary email address. This permission is approved by default.

  2. public_profile Provides access to a person's basic information, including first name, last name, profile picture, gender and age range. This permission is approved by default.

  3. user_friends Provides access to a person's list of friends that also use your app. This permission is approved by default.

If you want to use more feature apart from them , then you need to submit your app to facebook for use other feature

like if want to share photo then you have to submit your app for get publish_action permission facebook check that how you are using share or post in your app and you also need to upload screen shot with submission that show you are using facebook sharing.

But you can share or post on facebook use only email which you used to create app on developer.facebook.com or you can also create test user for sharing. But if you want that everyone can share or post via facebook that you need a permission from facebok.