title: How to get user name and email id for Facebook SDK?
body: <p>The code I have used </p>
  
  <pre><code> if (FBSession.activeSession.state == FBSessionStateOpen
          || FBSession.activeSession.state == FBSessionStateOpenTokenExtended) {
  
          // Close the session and remove the access token from the cache
          // The session state handler (in the app delegate) will be called automatically
          [FBSession.activeSession closeAndClearTokenInformation];
  
  
          // If the session state is not any of the two "open" states when the button is clicked
      } else {
          // Open a session showing the user the login UI
          // You must ALWAYS ask for basic_info permissions when opening a session
          [FBSession openActiveSessionWithReadPermissions:@[@"basic_info,email"]
                                             allowLoginUI:YES
                                        completionHandler:
           ^(FBSession *session, FBSessionState state, NSError *error) {
  
  
  
  
               // Retrieve the app delegate
               AppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
               // Call the app delegate's sessionStateChanged:state:error method to handle session state changes
               [appDelegate sessionStateChanged:session state:state error:error];
           }];
      }
  </code></pre>
  
  <p>from this code i need to get user name and mail id. if any one know the solution please help me thanks in advance.</p>