FacebookClientPlugin icon indicating copy to clipboard operation
FacebookClientPlugin copied to clipboard

Android not using Facebook Native app for login on SDK 30+

Open NGumby opened this issue 2 years ago • 0 comments

From this : https://developer.android.com/training/package-visibility facebook packages are not returned anymore by GetInstalledPackages, so IsAppInstalled returns false and always uses webview.

To fix, you can put this in your AndroidManifest, within the manifest tag

  <queries>
    <package android:name="com.facebook.katana" />
    <package android:name="com.facebook.lite" />
  </queries>

It think it could be fixed in the package by using this LoginManager.Instance.SetLoginBehavior(LoginBehavior.NativeWithFallback); instead of LoginManager.Instance.SetLoginBehavior(IsAppInstalled() ? LoginBehavior.NativeOnly : LoginBehavior.WebOnly);

NGumby avatar Jun 12 '23 15:06 NGumby