How can I call the Facebook delegates using Swift? Xcode doesn't autocomplete and I don't know how use it.
import UIKit
class ViewController: UIViewController,FBLoginViewDelegate {
@IBOutlet var fbLoginView : FBLoginView
override func viewDidLoad() {
super.viewDidLoad()
self.fbLoginView.delegate = self
self.fbLoginView.readPermissions = ["public_profile", "email", "user_friends"]
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// Facebook Delegates
}
I will give one example translation and explain it so that you should be able to translate the rest of the delegate methods:
FBLoginView!
FBGraphUser
.This leaves us with this translation: