Search code examples
androidflutterfacebookamazon-cognitofacebook-login

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

  • 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'