使用firebaseui的Facebook登录无法正常工作errorCode:100,subErrorCode:33,errorType:GraphMethodException

问题描述 投票:0回答:1

我已遵循the Authenticate using Facebook Login指南。当我到达“使用Firebase进行身份验证”时,它说我应该遵循Facebook developer's documentation。我在[<4。中的Androidmanifest中添加了facebook_app_id。编辑您的资源和清单,第4步:

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
我有一个错误:

Manifest merger failed : Attribute meta-data#com.facebook.sdk.ApplicationId@value value=(@string/facebook_app_id) from AndroidManifest.xml:52:13-52 is also present at [com.firebaseui:firebase-ui-auth:4.3.1] AndroidManifest.xml:21:13-60 value=(@string/facebook_application_id). Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:50:9-52:55 to override.

无论如何添加密钥似乎很奇怪,因为我使用Firebase以便拥有一个自动的用户界面,所以我希望Firebase能够为我解决这个问题。 firebase文档还显示“如果您使用LoginButton集成了Facebook登录”,为什么我要这样做?实施firebase UI的全部原因是无需添加按钮等。

当我删除facebook_app_id时,出现以下错误:

E/GraphResponse: {HttpStatus: 400, errorCode: 100, subErrorCode: 33, errorType: GraphMethodException, errorMessage: Unsupported get request. Object with ID '1234567890' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api}

这似乎是问题所在。这是我的build.gradle:

implementation 'com.firebaseui:firebase-ui-auth:4.3.1' implementation 'com.firebaseui:firebase-ui-database:3.1.0' implementation "com.google.firebase:firebase-auth:$firebase" implementation "com.google.firebase:firebase-database:$firebase" implementation 'com.facebook.android:facebook-android-sdk:5.0.0' implementation 'com.facebook.android:facebook-login:5.0.0'

我已启用Facebook登录并添加了必要的键:

enter image description here

我还添加了重定向URI和开发密钥哈希:

enter image description here

android firebase facebook-login
1个回答
0
投票
几天来我都遇到了同样的问题,然后我发现Facebook登录完全可以正常工作,即使有错误-第二个错误-。而且我仍然想知道为什么会显示此错误!

如果您的应用崩溃了,那么这个答案根本就没有用。

© www.soinside.com 2019 - 2024. All rights reserved.