title: How to log out from fbsession?
body: <p>H,In my app a user can login to the app using facebook.I am able to login successfully using fbsession but i am not able to logout form fbsession.Once the user login to the app i have do manually log out from fbsession. but i am not able to log out from fbseesion. In my app when ever i click on login button its not directing  to login page its directly showing dialog page,where as for me i have to show login page every time in my app. 
  here is my code </p>
  
  <pre><code>   - (IBAction)facebooklogin:(id)sender
   {
         [FBSession openActiveSessionWithReadPermissions:@[@"email",@"user_location",@"user_birthday",@"user_hometown"]
                                     allowLoginUI:YES
                                completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
  
                                    switch (state) {
                                        case FBSessionStateOpen:
                                            [[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary&lt;FBGraphUser&gt; *user, NSError *error) {
                                                if (error) {
                                                    NSLog(@"error:%@",error);
                                                }
                                                else
                                                {
                                                    // retrive user's details at here as shown below
                                                    NSLog(@"user   :%@",user);
  
                                                    NSDictionary *resultdict=[[[NSDictionary alloc]initWithObjectsAndKeys:user.first_name,@"FirstName",user.last_name,@"LastName",user.last_name,@"LastName",user.birthday,@"Birthday",user.username,@"Username",[user objectForKey:@"email"],@"Email",user.id,@"FBUserId", nil]autorelease];
  
                                                    [[NSUserDefaults standardUserDefaults]setObject:resultdict forKey:@"FBUserDetails"];
                                                    NSString *userid=[NSString stringWithFormat:@"%@@social",user.id];
                                                    [self performSelector:@selector(checkSocialNetworkingRegisteredOrNot:) withObject:userid afterDelay:0.0f];
                                                }
                                            }];
                                            break;
  
                                        default:
                                            break;
                                    }
                                } ];
   }
  </code></pre>
  
  <p>/////////////////////////manually logout from fbsession ///////////</p>
  
  <pre><code>  - (IBAction)logoutmanullayInbackground:(id)sender
  {
  [FBSession.activeSession closeAndClearTokenInformation];
  [[FBSession activeSession] close];
  [[FBSession activeSession] closeAndClearTokenInformation];
  [FBSession setActiveSession:nil];
  </code></pre>
  
  <p>}</p>