Let me apologize first, just learning swift, so I am not 100% on what I am doing. I have found many tutorials on integrating a facebook login in swift and have what appears
Facebook as changed SDk. Please find the latest solution here
http://www.brianjcoleman.com/tutorial-how-to-use-login-in-facebook-sdk-4-0-for-swift/
I would like to suggest you the cheking of these steps: -in your VC class, import FacebookSDK statement and FBLoginViewDelegate ? - your outlet should be:
//FB outlet
@IBOutlet var fbLoginView: FBLoginView
- in your AppDelegate.swift, also imported the FacebookSDK ? - you have a func in a func in your AppDelegate.swift.It should be:
import FacebookSDK
@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
//FB implementation
FBLoginView.self
FBProfilePictureView.self
return true
}
//FB Method handles what happens after authentication
func application (application:UIApplication, openURL url:NSURL, sourceApplication:NSString?, annotation:AnyObject) -> Bool {
//test var
var wasHandled:Bool = FBAppCall.handleOpenURL(url, sourceApplication: sourceApplication)
// attempt to extract a token from the url
return wasHandled
}