Facebook 登录错误 - Xcode 8 GM
Facebook Login Error - Xcode 8 GM
我正在使用最新的 Facebook SDK,当我 运行 下面的代码块时出现此错误:Facebook signup error - The operation couldn’t be completed. (com.facebook.sdk.login error 308.)
这是我的代码:
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: "")
}
}
}
我想通了!这与 Apple 处理 Keychain 的方式有关。您所要做的就是进入应用程序目标下的 "Compatibilities" 选项卡并打开 "Keychain Sharing"。 是一个更令人满意的答案。
我正在使用最新的 Facebook SDK,当我 运行 下面的代码块时出现此错误:Facebook signup error - The operation couldn’t be completed. (com.facebook.sdk.login error 308.)
这是我的代码:
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: "")
}
}
}
我想通了!这与 Apple 处理 Keychain 的方式有关。您所要做的就是进入应用程序目标下的 "Compatibilities" 选项卡并打开 "Keychain Sharing"。