11

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

Mizmor
  • 1,391
  • 6
  • 21
  • 43

7 Answers7

4

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/

Islam Alshnawey
  • 692
  • 10
  • 15
1

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

Mizmor
  • 1,391
  • 6
  • 21
  • 43
0

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".

Peter
  • 21
  • 3
  • The issue is when users are using an application that requires Facebook login. If they don't have the Facebook application, then they'll be presented with the webview login. To this extent, there's no "cookies" or "local storage" *per se* - uninstalling and reinstalling the application will clear anything that's left behind, but unfortunately, it doesn't fix the issue – divillysausages Jun 28 '21 at 12:17
  • Yes, my assumption was that the webview is browser-based and may use cookies or any type of local storage. In theory it could be using the Android default browser to create this webview--thats just a wild guess though. However, if that is not the case, I apologize and I should remove my answer. – Peter Jun 28 '21 at 19:30
0

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.

Faehe
  • 1
  • 1
0

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

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

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 18 '21 at 10:14
-2

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.

-3

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.