2

I am using the latest Facebook SDK and I get this error when I run the block of code below: Facebook signup error - The operation couldn’t be completed. (com.facebook.sdk.login error 308.)

Here is my code:

func signupWithFacebook() {

    FBSDKLoginManager().logIn(withReadPermissions: ["public_profile"], from: self) { (result, error) in

        if let error = error {

            print("Facebook signup error - \(error.localizedDescription)")

        } else if result != nil {

            let credential = FIRFacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)

            self.facebookSignup = true

            self.addUserToAuth(credential, twitterUserID: "")

        }
    }
}
Dan Levy
  • 3,931
  • 4
  • 28
  • 48
  • Possible duplicate of [How to use Facebook iOS SDK on iOS 10](http://stackoverflow.com/questions/38689631/how-to-use-facebook-ios-sdk-on-ios-10) – Roman Ermolov Aug 13 '16 at 12:03

1 Answers1

2

I Figured it out! It has to do with the way Apple deals with Keychain. All you have to do is go into the "Compatibilities" tab under the target for your app and turn "Keychain Sharing" on. Here is a more fulfilling answer.

Community
  • 1
  • 1
Dan Levy
  • 3,931
  • 4
  • 28
  • 48