title: Fetch user data from Facebook on iOS
body: <p>I am new to iOS
               I just want to get info  such as gender, city, e-mail, and date of birth</p>
  
  <p>but from code which I posted below  ,I just got an idea like how to post data on Facebook,</p>
  
  <p>now I want to  fetch user details form Facebook </p>
  
  <p><strong>.h</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;Social/Social.h&gt;
  
  @interface ViewController : UIViewController
  - (IBAction)PostFB:(id)sender;
  - (IBAction)PostTW:(id)sender;
  
  @end
  </code></pre>
  
  <p><strong>.m</strong></p>
  
  <pre><code>//
  //  ViewController.m
  //  FaceBookFirstApp3
  //
  //  Created by hits1 on 27/01/14.
  //  Copyright (c) 2014 hits1. All rights reserved.
  //
  
  #import "ViewController.h"
  #import &lt;Social/Social.h&gt;
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (IBAction)PostFB:(id)sender {
  
      if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
      {
          SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
  
          [controller setInitialText:@"First post from my iPhone app"];
  
          [self presentViewController:controller animated:YES completion:Nil];
      }
  }
  
  - (IBAction)PostTW:(id)sender {
  
      if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
      {
          SLComposeViewController *tweetSheet = [SLComposeViewController
                                                 composeViewControllerForServiceType:SLServiceTypeTwitter];
          [tweetSheet setInitialText:@"Great fun to learn iOS programming at appcoda.com!"];
          [tweetSheet addURL:[NSURL URLWithString:@"http://www.appcoda.com"]];
          [tweetSheet addImage:[UIImage imageNamed:@"socialsharing-facebook-image.jpg"]];
          [self presentViewController:tweetSheet animated:YES completion:nil];
      }
  
  
  
  }
  @end
  </code></pre>
  
  <p>please, help me Out to  Fetch  at least one field(city (or) gender (or) phone-number) form Gmail or Facebook </p>