- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 iOS 中使用 swift 语言使用 Firebase。我正在尝试使用 Facebook 登录。我正在使用 graphRequest 获取 FBSDKAccessToken。当我使用 Facebook 的 Firebase 登录方法时出现以下错误
UserInfo={NSUnderlyingError=0x608000059560 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)"
UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
code = 400;
errors = (
{
domain = global;
message = "Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#4) Application request limit
reached\",\"type\":\"OAuthException\",\"is_transient\":true,\"code\":4,\"fbtrace_id\":\"En2h2Q0L7TP\"}}";
reason = invalid;
}
);
message = "Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#4) Application request limit
reached\",\"type\":\"OAuthException\",\"is_transient\":true,\"code\":4,\"fbtrace_id\":\"En2h2Q0L7TP\"}}";
}}}, error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for
more information.}
我的完整代码是
{
let login : FBSDKLoginManager = FBSDKLoginManager()
login.logOut()
login.logInWithReadPermissions(["public_profile","email"], fromViewController: self, handler: { (result, error) -> Void in
if (error == nil){
let request: FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me", parameters: ["fields": "id,email,first_name,middle_name,last_name,picture"], HTTPMethod: "GET")
request.startWithCompletionHandler({ (connection : FBSDKGraphRequestConnection!, result : AnyObject!, error : NSError!) -> Void in
if error == nil
{
let userDetail : NSDictionary = result as! NSDictionary
let token = FBSDKAccessToken.currentAccessToken().tokenString
let credential = FIRFacebookAuthProvider.credentialWithAccessToken(token)
FIRAuth.auth()?.signInWithCredential(credential, completion: { (user, error) in
if error == nil
{
let homeVC = self.storyboard?.instantiateViewControllerWithIdentifier("PageController") as? PageController
self.navigationController?.pushViewController(homeVC!, animated: true)
print(userDetail)
}
else
{
print("Signing Failed ")
}
})
}
else
{
print("Error Getting Info \(error)");
}
})
}else{
print("Login Failed")
}
})
return;
}
最佳答案
我已经通过更改 info.plist 和 URL 中的 FacebookAppID 解决了这个问题
我使用了与 Firebase 应用程序无关的那个。 (旧的)
这是我的登录流程
1) fbLoginManager.login
2) let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
3) Auth.auth().signIn(with: credential)
关于ios - Firebase signInWithCredential 使用 Facebook SDK 给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43519458/
我正在 Firebase (web js sdk) 中设置 Microsoft 身份验证,但我遇到了 firebase.auth.signInWithCredential 错误。我可以从 Micros
我正在尝试连接到第二个 Firebase 应用并使用 signInWithCredential() 进行身份验证,但我不知道如何为第二个应用获取有效的 idToken : connect(acce
[dart] 未为类“FirebaseAuth”定义方法“signInWithCredential”。 [undefined_method] 我的 main.dart 代码 import 'packa
问候 flutter 开发人员正在为 iOS 和 android 开发一个应用程序,它使用手机身份验证来验证用户,在 iOS 中一切正常,但对于 android,当调用此行时我收到错误: fi
我想在 Flutter 项目中使用 FirebaseAuth 链接电话和电子邮件身份验证。 步骤如下: auth = FirebaseAuth.instance; 获取用户的电话号码并使用 auth.
我在 iOS 中使用 swift 语言使用 Firebase。我正在尝试使用 Facebook 登录。我正在使用 graphRequest 获取 FBSDKAccessToken。当我使用 Faceb
我的 Facebook 登录正常,Firebase 网站上的最后 2 条说明是: let credential = FIRFacebookAuthProvider.credential(withAcc
我正在使用 react-native-facebook-login 包来登录用户。目前流程运行良好,在用户输入他们的详细信息后,我成功地看到了一个带有他们信息的对象。 当我尝试使用 signInWit
何时使用 this.afAuth.auth.signInWithCredential 在我的 Ionic 应用程序中一切正常。我可以使用 Google 身份验证登录并将用户个人资料推送到 fireba
我在使用 firebase 登录功能时遇到了这个问题,我不知道如何解决。请帮忙,谢谢。 我的登录函数代码如下: Future signIn() async{ final formState = _fo
我是一名优秀的程序员,十分优秀!