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
Kindly update your Facebook library version if it was not already updated.
Here is an updated version of Facebook SDK.
Thank you.
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>
tagI 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.