Swift3 iOS 10-Swift 3-尝试测试Facebook身份验证

Swift3 iOS 10-Swift 3-尝试测试Facebook身份验证,swift3,firebase-authentication,ios10,facebook-authentication,Swift3,Firebase Authentication,Ios10,Facebook Authentication,请不要标记为重复。这是针对iOS 10和Swift 3的。我已经尝试了这个网站上其他问题的一切 我正在测试我的应用程序中允许用户使用facebook登录的按钮。我仔细检查了教程中我所遵循的所有内容,当我在模拟器中测试按钮时,仍然得到相同的错误。控制台显示 canOpenURL:URL:“fbauth2:/”失败-错误:“操作无法完成。(OSStatus错误-10814)。” 以下是我在用户登录的视图控制器中使用的代码: @IBAction func facebookBtnTapped(_ sen

请不要标记为重复。这是针对iOS 10和Swift 3的。我已经尝试了这个网站上其他问题的一切

我正在测试我的应用程序中允许用户使用facebook登录的按钮。我仔细检查了教程中我所遵循的所有内容,当我在模拟器中测试按钮时,仍然得到相同的错误。控制台显示

canOpenURL:URL:“fbauth2:/”失败-错误:“操作无法完成。(OSStatus错误-10814)。”

以下是我在用户登录的视图控制器中使用的代码:

@IBAction func facebookBtnTapped(_ sender: AnyObject) {

    let facebookLogin = FBSDKLoginManager()

    facebookLogin.logIn(withReadPermissions: ["email"], from: self) { (result, error) in
        if error != nil {
            print("Unable to authenticate with Facebook - \(error)")
        } else if result?.isCancelled == true {
            print("User cancelled Facebook authentication")
        } else {
            print("Successfully authenticated with Facebook")
            let credential = FIRFacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
            self.firebaseAuth(credential)
        }
    }
}

func firebaseAuth(_ credential: FIRAuthCredential) {
    FIRAuth.auth()?.signIn(with: credential, completion: { (user, error) in
        if error != nil {
            print("Unable to authenticate with Firebase - \(error)")
        } else {
            print("Successfully authenticated with Firebase")

        }
    })
}
}

我的代码中没有错误,所有内容都通过facebook和firebase正确设置。这对指导中的老师来说很好。我试图打印:“通过Facebook成功认证”和“通过Firebase成功认证”

本教程是Devslopes在Udemy课程中的社交应用程序。这里有没有人遇到过同样的问题并且能够解决?感谢您的帮助