Error When Logging on Facebook/Firebase on Android

59 Views Asked by At

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). Im using a test user provided by Facebook to log in, but nothing happens, when i try to log the app says something like:

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:

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). 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!)

1

There are 1 best solutions below

0
angelo canales On

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.