简体   繁体   English

在 Android 上登录 Facebook/Firebase 时出错

[英]Error When Logging on Facebook/Firebase on Android

I am making an application that uses Facebook login, the App is on development and i am trying it on my personal smartphone (a Xiaomi).我正在制作一个使用 Facebook 登录的应用程序,该应用程序正在开发中,我正在我的个人智能手机(小米)上试用它。 Im using a test user provided by Facebook to log in, but nothing happens, when i try to log the app says something like:我正在使用 Facebook 提供的测试用户登录,但没有任何反应,当我尝试登录该应用程序时说的是这样的:

Log in error. There was an error signing into this app. Try again later

I don't know which can be the issue.我不知道哪个可能是问题所在。 When i try to do the same on the emulator it works.当我尝试在模拟器上做同样的事情时,它起作用了。 (it opens Chrome to Log in, in my phone it opens the Facebook App (maybe thats the problem?) The emulator returns this as result.accessToken: (它打开 Chrome 进行登录,在我的手机中它打开 Facebook 应用程序(也许这就是问题所在?)模拟器将其作为 result.accessToken 返回:

TOKN: {AccessToken token:ACCESS_TOKEN_REMOVED permissions:[user_likes, openid, public_profile, user_friends, email]}

And it shows the profile on the Authentication tab in Firebase (so it actually works).它在 Firebase 中的“身份验证”选项卡上显示配置文件(因此它确实有效)。 I dont know why is not working in a real device.我不知道为什么不能在真实设备上工作。

This are some screenshots of the app: Log Button , Profile Selection Screen (Test Profile) , Error Message .这是应用程序的一些屏幕截图:日志按钮配置文件选择屏幕(测试配置文件)错误消息 I dont think is a coding problem, because as i said before works fine on emulator.我认为这不是编码问题,因为正如我之前所说,在模拟器上运行良好。 I have added everything on my manifest, and i implement all the libraries needed.我已经在我的清单上添加了所有内容,并且我实现了所有需要的库。 Like the following lines: Manifest Code (PD: i tried A LOT to paste the code, but this page was sending me the same error all the time, and the indentation was correct, im new so i was suffering a little with this, sorry!)像下面几行:清单代码(PD:我尝试了很多粘贴代码,但是这个页面一直向我发送相同的错误,并且缩进是正确的,我是新手所以我有点受苦,抱歉!)

I solve it by myself, i was using the app in development mode, that means that i need to put a hash for every device im using to develop, when i run the command on my computer it gives me the hash of my computer, i used the signing report of android studio on my Smart phone, it gives me other hash, then i put it on facebook and voilá, it works now.我自己解决了,我在开发模式下使用应用程序,这意味着我需要为我用来开发的每个设备放置一个 hash,当我在我的计算机上运行命令时,它会给我计算机的 hash,我在我的智能手机上使用了 android 工作室的签约报告,它给了我另一个 hash,然后我把它放在 facebook 上,瞧,它现在可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 unity Firebase Facebook auth on Android - Unity Firebase Facebook auth on Android Android Firebase Oauth Facebook 无法在片段中工作 - Android Firebase Oauth Facebook not working in fragment 尝试使用 Google/Facebook 登录时出现 Firebase 错误“auth/argument-error” - Firebase error "auth/argument-error" when trying to sign in with Google/Facebook 与 Firebase 安装服务器 API 通信时的 Android 错误 - Android Error when communicating with the Firebase Installations server API 使用 firebase unity sdk firestore package 时 android 设备出错 - Error on android device when using firebase unity sdk firestore package 使用 firebase 作为身份验证器登录时,用户会立即注销 - User is instantly logged out when logging in using firebase as authenticator on react 如何在应用程序启动时阻止 Firebase 记录状态更新 - How to stop Firebase from logging status updates when app is launched 将 firebase 依赖项添加到 android 应用程序时,应用脚本 build.gradle 错误 - Apply script build.gradle error when adding firebase dependencies to an android app 使用 appcompat-v7:28.0.0 将 Firebase Analytics 添加到 Android 项目时出错 - Error when adding Firebase Analytics to Android project with appcompat-v7:28.0.0 Android Firebase Auth Facebook 如何在Kotlin注销更改facebook账户? - Android Firebase Auth Facebook how to sign out to change facebook account in Kotlin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM