roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
405 stars 331 forks source link

Error while logging-in test users #158

Open feinstein opened 5 years ago

feinstein commented 5 years ago

I have a new project where I am using Firebase Auth and this library. I followed all the setups steps, added a test user into Facebook for Developers, but when I try to log this user I get an error.

I have an old project that worked fine, so I tried running this old project and I also get an error, the error just changes as there I get a login error screen from facebook. But that old project is using an old version of this library, once I update it, I get the same behavior.

I can't see any errors at Facebook for Developers, I just see it complaining I am not using the latest version of their API, that instead I am using Android v4.39.0 (The latest version is 5.0.1).

Maybe their API got upgraded and this library stopped working with test users?

Since my app is still in development stages I can only test it with test users.

feinstein commented 5 years ago

Works fine on Android API 21, but fails on Android API 28.

chynnasevilleno commented 5 years ago

@feinstein Could you post the results of your result.errorMessage? I experienced this too, maybe I can help out.

chynnasevilleno commented 5 years ago

Upon inspecting the error generated by logging in the test user, it showed an error message saying User logged in as different Facebook user

In case anyone encounters the same error, it's possible that an existing user is logged into your application.

You can solve this by executing FacebookLogin().logOut() on logout to clear your logged in user's existing token. After doing so, you should be able to login using your test users. (Reference)

Tested on Note 5 / Android 7.0