Q:

User permission not asked while posting to FB iOS

I am trying to post a message to Facebook wall using Facebook SDK in iOS.  After loging in successfully, user permission is not asked before posting to Facebook.  I have made a request to all permissions using request new publish permission method in iOS sdk.  Any body have ideas on how I could show the user permission screen when I click post message? 
Below is the code I used:
//Login:

     [FBSession openActiveSessionWithReadPermissions:nil
                                              allowLoginUI:YES
                                         completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
                                             if(!error) {
                                                 if(state == FBSessionStateOpen)
                                                     [self postWithText: @"message"
                                                          ImageName: @""
                                                                URL: @""
                                                            Caption: @""
                                                               Name: @""
                                                     andDescription: @""];                                             
                                             } else {
                                                 [FBSession.activeSession closeAndClearTokenInformation];
                                                 //show error message                                          }
                                         }];
-(void) postWithText: (NSString*) message
           ImageName: (NSString*) image
                 URL: (NSString*) url
             Caption: (NSString*) caption
                Name: (NSString*) name
      andDescription: (NSString*) description
{

    NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                   message, @"message",
                                   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)
             {

                     [self postToWall: params];
             }
         }];
    }
    else
    {
            [self postToWall: params];
    }
}

-(void) postToWall: (NSMutableDictionary*) params
{

    [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];
         }
     }];
}

A:

ok, i tried your code and it seems to be working ... can you try to login with your Facebook id, remove the app from App Settings (in Facebook), logout from within your app and log in back - a clean start.  I'm assuming you log the user only once (so there's a test for [[FBSession activeSession] isOpen] somewhere.  Place breakpoints on requestNewPublishPermissions and check if it's called at all (maybe it just ends with an error which you're not capturing).  You might want to check this answer as well.