我使用的是最新的Facebook SDK,當我運行下面的代碼塊我得到這個錯誤:Facebook signup error - The operation couldn’t be completed. (com.facebook.sdk.login error 308.)
Facebook的登錄錯誤 - Xcode的8 GM
這裏是我的代碼:
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: "")
}
}
}
可能的重複[如何在iOS 10上使用Facebook iOS SDK](http://stackoverflow.com/questions/38689631/how-to-use-facebook-ios-sdk-on-ios-10) –