title: Retrieve email FacebookSDK and Swift
body: <p>I'm successfully implemented facebook login in my app, but I'm not able to query/retrieve the email address from the user.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>import UIKit
  
  class testViewController: UIViewController, FBSDKLoginButtonDelegate {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
  
          if (FBSDKAccessToken.currentAccessToken() != nil)
          {
              // User is already logged in, do work such as go to next view controller.
  
              // Or Show Logout Button
              let loginView : FBSDKLoginButton = FBSDKLoginButton()
              self.view.addSubview(loginView)
              loginView.center = self.view.center
              loginView.readPermissions = ["public_profile", "email", "user_friends"]
              loginView.delegate = self
              self.returnUserData()
          }
          else
          {
              let loginView : FBSDKLoginButton = FBSDKLoginButton()
              self.view.addSubview(loginView)
              loginView.center = self.view.center
              loginView.readPermissions = ["public_profile", "email", "user_friends"]
              loginView.delegate = self
          }
  
      }
  
      // Facebook Delegate Methods
  
      func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!) {
          println("User Logged In")
  
          if ((error) != nil)
          {
              // Process error
          }
          else if result.isCancelled {
              // Handle cancellations
          }
          else {
              // If you ask for multiple permissions at once, you
              // should check if specific permissions missing
              if result.grantedPermissions.contains("email")
              {
                  // Do work
              }
  
              self.returnUserData()
          }
  
      }
  
      func loginButtonDidLogOut(loginButton: FBSDKLoginButton!) {
          println("User Logged Out")
      }
  
      func returnUserData() {
          let graphRequest : FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me", parameters: nil)
          graphRequest.startWithCompletionHandler({ (connection, result, error) -&gt; Void in
  
              if ((error) != nil)
              {
                  // Process error
                  println("Error: \(error)")
              }
              else
              {
                  println("fetched user: \(result)")
                  let userName : NSString = result.valueForKey("name") as! NSString
                  println("User Name is: \(userName)")
                  let userEmail : NSString = result.valueForKey("email") as! NSString
                  println("User Email is: \(userEmail)")
              }
          })
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
  }
  </code></pre>
  
  <p>And the println output:</p>
  
  <pre><code>fetched user: {
      id = 808101565906152;
      name = "Marcelo Pontes Machado";
  }
  </code></pre>
  
  <p>When I try to display the email I got a nill value.</p>
  
  <p>I think the code is right, maybe some SDK that I miss to import?</p>