title: Store and Save Facebook Data Using Parse Using Swift
body: <p>I have a Facebook sign in button on my app. How can I get Parse to save the Facebook user as a parse user and save the data (email address) into the Parse Database?</p>
  
  <p>Below is the code for my Facebook button.</p>
  
  <pre><code>   @IBAction func didTapFacebookConnect(sender: AnyObject) {
      let permissions = [ "public_profile", "email", "user_friends" ]
  
      PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions) {
          (user: PFUser?, error: NSError?) -&gt; Void in
          if let user = user {
              if user.isNew {    
  
                  print ("User signed up and logged in through Facebook!")
  
              } else {
                  print ("User logged in through Facebook!")
  
              }
          } else {
              print ("Uh oh. The user cancelled the Facebook login.")
  
          }
  </code></pre>