I'm trying to implement facebook login on IOS using the new Facebook SDK. I'm getting stuck because I'm using my own custom facebook login button, where the SDK requires you to use its own login button. Can someone please help? I need to implement the part where someone click on the custom login button and authenticates using facebook after granting permission. Thanks!
I looked at the Documentation and it only provides support for Objective C and not swift
Here's what I had before the SDK update that no longer works
let loginManager = LoginManager()
loginManager.logIn(permissions: [ ".publicProfile, .email" ], viewController: self) { loginResult in
switch loginResult {
case .failed:
self.showMessage("Error logging you in.", "Could not log you in. Please try again.", .error)
case .cancelled:
self.showMessage("User canceled login.", "User cancelled login. Please try again.", .error)
case .success:
self.setFBUserData()
}
}