How to opt out from Facebook SDK event logging?

送分小仙女□ 提交于 2019-12-23 06:48:14

问题


I'm using Facebook App Events tracking for Android, but I have no idea how to disable tracking when a user wants to opt out! Does anyone know how to do that?

The documentation says:

We recommend that you use our SDK tools to offer the opt-out.

But they don't actually describe it anywhere. Classic Facebook move.

EDIT: Now with the GDPR being in effect for so long, they still don't have any way to disable all tracking until the user consents, do they?


回答1:


Don't know about per User, but you can opt put from Facebook SDK event logging:

Add this int your Android.Manifest.xml:

<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
            android:value="false"/>



回答2:


After the documentation was updated it seems the new way to go is a combination of disabling

<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
        android:value="false"/>
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled"
        android:value="false"/>
<meta-data android:name="com.facebook.sdk.AutoInitEnabled"
        android:value="false"/> <!--OPTIONAL-->

And at runtime to opt in call:

FacebookSDK.setAdvertiserIDCollectionEnabled(true)
FacebookSDK.setAdvertiserIDCollectionEnabled(true)
// OPTIONALLY the following two lines if AutoInitEnabled is set to false in manifest:
FacebookSDK.setAutoInitEnabled(true)
FacebookSDK.fullyInitialize()

Right now I don't see when it would be good to disable (and later enable) auto init, maybe someone else might have an idea here.




回答3:


The opt-out they are talking about is described in the heading below: https://developers.facebook.com/docs/app-events/android#setlimiteventusage

You can call AppEventsLogger.setLimitEventUsage(this, true); to "opt-out" (at least limit) how the events logged are used.



来源:https://stackoverflow.com/questions/39994292/how-to-opt-out-from-facebook-sdk-event-logging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!