I tried to search this but couldn't find anything useful.

```
[FBSession setActiveSession:[[FBSession alloc] initWithPermissions:[NSArray arrayWithObjects:@"publish_actions,read_stream,user_hometown,user_birthday,email", nil]]];

    [[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView completionHandler:
    ^(FBSession *session,FBSessionState state,NSError *error)
    {
        if(state == FBSessionStateOpen)
       {
             // use user's detail and post on Facebook
       }
    }];

```

Now this works fine for me. But what if user presses close/cancel button before logging into Facebook. I need to execute set of statements if user pressed cancel button. How can i do this. 
Any help would be appreciated.