Firebase-无法登录到Facebook身份验证

问题描述:

在身份验证完成并且用户登录到Facebook后,我试图移至新的视图控制器,但出现错误消息"Error Domain = FIRAuthErrorDomain Code = 17999",发生内部错误,请打印并检查有关错误的详细信息,以获取更多信息."我看了一下文档,对我来说似乎很对,但是也许我遗漏了一些东西.这是我的Facebook登录按钮的代码

I'm trying to move to my new view controller after the auth is complete and the user has loged into facebook but I get a error saying "Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information."" I've looked over the documentation and it looks right to me but maybe I'm missing something. Here is my code for my facebook login button

@IBAction func FacebookBtnPressed(sender: AnyObject) {
    let login = FBSDKLoginManager()

    login.logInWithReadPermissions(["email"], fromViewController: self) { (result: FBSDKLoginManagerLoginResult!, facebookError: NSError!) -> Void in

        if (facebookError != nil) {
            print("Facebook login failed. Error: \(facebookError)")
        } else if result.isCancelled {
            print("Cancelled")
        } else {
            let acessToken = FBSDKAccessToken.currentAccessToken().tokenString
            print("Logged in. \(acessToken)")

            let credential = FIRFacebookAuthProvider.credentialWithAccessToken(FBSDKAccessToken.currentAccessToken().tokenString)

            FIRAuth.auth()?.signInWithCredential(credential, completion: { (user, error) in

                if error != nil {
                    print("Login failed. \(error)")
                } else {
                    print("Logged in. \(user)")

                    let userData = ["provider": credential.provider]
                    DataService.ds.createFirebaseUser(user!.uid, user: userData)

                    NSUserDefaults.standardUserDefaults().setValue(user!.uid, forKey: KEY_UID)
                    self.performSegueWithIdentifier("loggedIn", sender: nil) // currently not working
                }

            })

完整错误日志:

(错误域= FIRAuthErrorDomain代码= 17999内部错误已
发生时,请打印并检查错误详细信息以获取更多信息."
UserInfo = {NSUnderlyingError = 0x7fa702c55080 {Error Domain = FIRAuthInternalErrorDomain Code = 3(null)" UserInfo = {FIRAuthErrorUserInfoDeserializedResponseKey = {type =不变的字典,count = 3, 条目=> 0:{目录= 邮件"} = {内容= 标记为删除的项目."} 1:错误= {类型=不可变,计数= 1,值=(0: {type =不变的字典, count = 4,条目=> 1:消息= {内容=标记为要删除的项目."} 3:原因 = {contents ="accessNotConfigured"} 4:域= {contents ="usageLimits"} 5:{contents ="extendedHelp"} = {contents =" https://console.developers.google.com }}

(Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has
occurred, print and inspect the error details for more information."
UserInfo={NSUnderlyingError=0x7fa702c55080 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={type = immutable dict, count = 3, entries => 0 : {contents = "message"} = {contents = "Project marked for deletion."} 1 : errors = {type = immutable, count = 1, values = ( 0 : {type = immutable dict, count = 4, entries => 1 : message = {contents = "Project marked for deletion."} 3 : reason = {contents = "accessNotConfigured"} 4 : domain = {contents = "usageLimits"} 5 : {contents = "extendedHelp"} = {contents = "https://console.developers.google.com"} }

)} 2:代码= {值= +403,类型= kCFNumberSInt64Type}}}},error_name = ERROR_INTERNAL_ERROR,NSLocalizedDescription =内部 发生错误,请打印并检查错误详细信息以获取更多信息 信息.)

)} 2 : code = {value = +403, type = kCFNumberSInt64Type} } }}, error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information.})

已修复..我创建了一个新项目,但是忘记了导入新的plist文件和API密钥.它使用的是旧版本,因此这就是为什么它在日志中说标记为删除"

Fixed.. I created a new project and I forgot to import the new plist file and the API key. It was using the old one so that's why it said in the log "marked for deletion"