title: Swift & Facebook login : my UIViewController does not conform to FBSDKLoginButtonDelegate
body: <p>Even if Facebook tutorial says that there is no need of an header, I had problems while adding FBSDK functionalities via simple importing framework in the .swift files.</p>
  
  <p>So, I followed this tutorial: 
  <a href="http://www.brianjcoleman.com/tutorial-how-to-use-login-in-facebook-sdk-4-0-for-swift/" rel="noreferrer">http://www.brianjcoleman.com/tutorial-how-to-use-login-in-facebook-sdk-4-0-for-swift/</a>
  using swift 6.3 SDK Facebook 4.1 SDK</p>
  
  <p>but I got two issues</p>
  
  <pre><code>FBLoginViewViewController does not conform to FBSDKLoginButtonDelegate
  
  Cannot assign a value of type 'FBLoginViewViewController' to a value
  of type 'FBSDKLoginButtonDelegate!'
  </code></pre>
  
  <p>so I can't login, I tried removing the import statements, no change, I also implemented every statement in the appDelegate, everything should be ok, but still...</p>
  
  <p>thanks in advance</p>
  
  <pre><code> //
  //  FBLoginViewViewController.swift
  //  SocialFBLogin
  //
  //  Created by XXXX XXXX on 18/05/15.
  //  Copyright (c) 2015 XXXX XXXX. All rights reserved.
  //
  
  import UIKit
  
  import FBSDKCoreKit
  import FBSDKShareKit
  import FBSDKLoginKit
  
  
  
  //@objc(FBLoginViewViewController)
  class FBLoginViewViewController: UIViewController, FBSDKLoginButtonDelegate     {
  
  
  
  @IBOutlet weak var FBLoginPicture: UIImageView!
  @IBOutlet weak var FBLoginNameLabel: UILabel!
  
  override func viewDidLoad() {
  
  
      super.viewDidLoad()
      // Do any additional setup after loading the view.
  
      if (FBSDKAccessToken.currentAccessToken() != nil)
      {
          // User is already logged in, do work such as go to next view controller.
      }
      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
              }
          }
      }
  
      func loginButtonDidLogOut(loginButton: FBSDKLoginButton!) {
          println("User Logged Out")
      }
  
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  }
  </code></pre>