title: get Facebook user profile data after getting access token in iOS 5
body: <p>I am working on an iOS 5 app where i need to get user profile data after successful login.</p>
  
  <p>For now I am getting a access token when user get successful login.</p>
  
  <p>Now I am trying to get Facebook logged in user profile data using that access token.</p>
  
  <p>I tried to follow the sample app provided on the Facebook developer site.</p>
  
  <p>I am not using FBconnect type resource file. I add "facebookSDK.framework" from sample app.</p>
  
  <p>Please help me.</p>
  
  <p>Thanks,</p>
  
  <pre><code>- (void)populateUserDetails {
  
  FBRequestConnection *connection = [[FBRequestConnection alloc] init];
  
  // First request uploads the photo.
  FBRequest *request1 = [FBRequest requestForMe];
  
  
  if (FBSession.activeSession.isOpen) {
  
      [connection addRequest:request1
           completionHandler:
       ^(FBRequestConnection *connection, NSDictionary&lt;FBGraphUser&gt; *user, NSError *error) {
           if (!error) {
  
               NSLog(@"fb user name = %@",user.name);
               NSLog(@"fb user name = %@",user.id);
           }
  
           NSLog(@"fb2 user name = %@",user.name);
           NSLog(@"fb2 user name = %@",user.id);
       }
              //batchEntryName:@"photopost"
       ];
  
      [connection start];
  }
  </code></pre>
  
  <p>}</p>