Facebook iOS SDK 禁用自动记录应用程序事件

问题描述 投票:0回答:1

根据 Facebook iOS SDK 的文档,为了关闭自动事件(特别是要关闭 APP INSTALL),您需要将以下 plist 标志设置为 false。

FacebookAutoLogAppEventsEnabled

我还在启动时验证了

的值
Settings.shared.isAutoLogAppEventsEnabled = false

文档在这里: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#auto-events

但是,当我监控网络流量时,我看到图形 api 被 MOBILE_INSTALL 事件调用。

URL: https://graph.facebook.com/v15.0/appid/activities
{
  "include_headers": "false",
  "advertiser_id_collection_enabled": "1",
  "advertiser_id": "REMOVED",
  "application_tracking_enabled": "1",
  "event": "MOBILE_APP_INSTALL",
  "ud": "{}",
  "sdk": "ios",
  "format": "json",
  "extinfo": "[\"i2\",\"REMOVED\",\"3994\",\"3.1.20\",\"16.2\",\"iPhone15,3\",\"en_US\",\"EDT\",\"T-Mobile\",430,932,\"3.00\",6,119,21,\"America\\/New_York\"]",
  "install_timestamp": "1696449290",
  "url_schemes": "[\"REMOVED\",\"REMOVED\",\"REMOVED\",\"REMOVED\"]",
  "advertiser_tracking_enabled": "1",
  "access_token": "REMOVED",
  "anon_id": "REMOVED"
}

我是否遗漏了一些东西来阻止该事件自动发送。我正在使用 iOS facebook SDK 15.1.0。

ios swift facebook facebook-graph-api facebook-ios-sdk
1个回答
0
投票

你找到这方面的东西了吗,因为我也遇到了同样的问题。

我发现的一个解决方案是在正确的位置使用 ApplicationDelegate.shared.initializeSDK() 而不是使用 ApplicationDelegate.shared.application(, didFinishLaunchingWithOptions:)

但我还使用第三方 cocoa pod,它使用 ApplicationDelegate.shared.application didFinishLaunchingWithOptions 启动 Facebook SDK。

我尝试了所有这些但没有成功

FBSDKSettings.sharedSettings.autoLogAppEventsEnabled = NO;
FBSDKSettings.sharedSettings.advertiserTrackingEnabled = NO;
[FBSDKSettings.sharedSettings setAdvertiserTrackingEnabled: NO];
[FBSDKSettings.sharedSettings setAutoLogAppEventsEnabled: NO];
[FBSDKSettings.sharedSettings setSkAdNetworkReportEnabled: NO];
[FBSDKSettings.sharedSettings setAdvertiserIDCollectionEnabled: NO];
© www.soinside.com 2019 - 2024. All rights reserved.