简体   繁体   中英

Facebook SDK : 'Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared'

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.

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM