I installed FacebookSDK using Cocoapods, according to the terminal, I installed FacebookSDK 4.8.0 (CoreKit, ShareKit and LoginKit), I imported the files .hto BH-File.hmine and already initialized everything in my AppDelegate.
For some reason, when I try to log in using a custom button, when I initialize FBLoginManager, I get an error Use of undeclared type "FBLoginManager".
this is my code
if (FBSDKAccessToken.currentAccessToken() == nil)
{
let fbLoginManager : FBSDKLoginManager =
fbLoginManager.logInWithReadPermissions(["public_profile", "email"], fromViewController: self, handler: { (loginResult, error) -> Void in
if error == nil {
print (FBSDKAccessToken.currentAccessToken().tokenString)
}
else {
print ("ERROR*****: \(error)")
}
})
}
source
share