skip to Main Content

I use the Android Facebook SDK. I get the following message in Logcat:

com.facebook.internal.NativeProtocol: Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared. Please follow https://developers.facebook.com/docs/android/troubleshooting/#faq_267321845055988 to make the declaration.

What does that mean? Do I need to add in the manifest the item mentioned on facebook page mentioned in this error message, that is to say :

<manifest package="com.example.app"> <queries> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> </queries> ... </manifest>

Nota: I use no facebook dialog boxes in my app.

Thanks for your help.

3

Answers


  1. Kindly update your Facebook library version if it was not already updated.

    Here is an updated version of Facebook SDK.

    implementation("com.facebook.android:facebook-android-sdk:14.1.1") {
        because("Social Media Login integration")
    }
    

    Thank you.

    Login or Signup to reply.
  2. Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared in manifest file under <menifest> tag

        <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
        <provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
    </queries>
    
    Login or Signup to reply.
  3. I had to add the queries block as per Meta documentation as in the answer above but I still got the package visibility error when I tried to share content from my app with Facebook. I uninstalled the Facebook app on my device and reinstalled it with the latest version and then it worked.

    <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
        <provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
    </queries>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search