         }
         
     }
-    
 }
+
+// MARK: - Action
+extension LoginViewController{
+    @IBAction func fbButtonTapped(sender: UIButton) {
+        let login = FBSDKLoginManager()
+        login.logInWithReadPermissions(["public_profile", "email"], fromViewController: self, handler: { (result,error) -> Void in
+            if error != nil{
+                print(error.localizedDescription)
+                return
+            }else if result.isCancelled{
+                return
+            }else{
+                self.login()
+                print(FBSDKAccessToken.currentAccessToken())
+            }
+        })
+    }
+}
+

        weightTextField.text = "Please enter your weight"
        
    }
    
    func textFieldDidBeginEditing(textField: UITextField) {
        heightTextField.textColor = UIColor.mrDarkSlateBlueColor()
        weightTextField.textColor = UIColor.mrDarkSlateBlueColor()

        alert.addAction(ok)
        presentViewController(alert, animated: true, completion: nil)
    }

}

// MARK: - Facebook Login
extension LoginViewController{
    func login(){
        let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
        let homeViewController = self.storyboard?.instantiateViewControllerWithIdentifier("RevealViewController") as! SWRevealViewController
