'Unable to login with with Facebook on Android embedded browser

I am trying to login with Facebook on Android embedded browser. My code is written in Flutter and I am using AWS Cognito user pool for this purpose. I have done the Facebook configuration in Identity provider and it is working fine when I try to hit cognito APIs from web browser and it returns me id_token, refresh_token and access_token. But when I try to login with Android embedded browser I get error that For your account security, Logging into Facebook from and embedded browser is disabled although I have enabled it from Facebook Login setting in my Facebook App.

Here is the screenshot with error



Solution 1:[1]

Facebook has deprecated support for Facebook login from embedded browsers. You can check more details from here.

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

Solution 2:[2]

As facebook has deprecated support for login through embedded browsers. So please follow the following to fix-

  1. Go to settings of Facebook --> media --> click on link open externally
  2. Also, check your facebook sdk version in gradle
  3. Works fine with- implementation 'com.facebook.android:facebook-android-sdk:8.2.0'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hamza Javed
Solution 2 Preeti