Android Facebook Share Dialog Blocks Login Due To Embedded Browser

19.8k Views Asked by At

I am using the cordova-plugin-facebook-connect plugin to launch the share dialogs from Facebook. iOS is working great, and Android is working great when the app is installed.

On Android, if the app is not installed, it tries to share with an embedded web browser. After entering my email and password, I get an error saying that logging into Facebook from an embedded browser is disabled. I am using the latest version of the plugin, which SHOULD mean the latest Facebook Android SDK

Error Message after entering password and email

I have looked on our business dashboard and made sure that embedded login is allowed: embeded browser OAuth Login enabled ...but that mentions OAuth so maybe it's not relevant. I have uploaded the debug and production key hashes to the dashboard

I have found nothing on the Facebook docs and I haven't gotten an answer from the Facebook developer community.

To sum up:

If the app is installed, it is all good. Without the app, it uses the embedded browser, but Facebook is blocking the login. I would love to know WHY and how to enable it.

UPDATE: Using a Facebook generated test user worked

Cheers

7

There are 7 best solutions below

2
Peter On

I can't comment (yet) so I'm creating this answer to ask you if you could try and remove all (!) local browser data, i.e. Cookies and local storage, etc. This is the first thing that came to my mind when I read "works with another login".

0
Thomaz Caíque On

Try installing another browser, like Firefox, and set this the default browser, then login again with your Facebook credentials. It worked to me. I guess the problem is with chrome. For me, it worked when I set Firefox my default browser.

0
Mizmor On

Facebook has let everyone know that they are deprecating support for FB Login on Android embedded browsers:

https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/

As of right now, they are blocking High Risk users with this error and will block everyone starting in August. Their suggestion is to use a later version of the SDK (8.2+) to avoid this

0
Faehe On

The issue is resolved if the user has enabled 2-factor authentication via facebook. I have tested this with multiple real users now and for example enabling sms-2fa does enable the user to login into apps with an embedded browser. The login happens as usual if the user has the facebook app installed on the same device and already logged in on the facebook app with 2fa. Otherwise, facebook will request the 2fa when logging in but a login is possible again.

I have however found out that some apps seem to crash if they had been opened before 2fa had been activated on a phone with a facebook app and those apps need to restarted before trying to login on them again.

From this we can assume facebook blocks out embedded browsers due to their risk assessment. 2fa is specifically presented as an option to login via unsafe browsers within the security options of each user individually and sadly does not seem to be an issue on the side of who ever is using an embedded browser within their app.

0
Islam Alshnawey On

As Recommended by Facebook please update Dependencies to

implementation 'com.facebook.android:facebook-android-sdk:[8,9)'

Ref :

https://developers.facebook.com/docs/android/componentsdks/

https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/

1
Okoli Eucharia Chidiebere On

This also happened to me but I've fixed it.

I just uninstalled my Facebook application and used my browser instead.

0
Niraj kumar On

For your account security, logging in to Facebook from an embedded browser is disabled. You may be able to continue by updating the app you're logging in from and trying again.