California Consumer Privacy Act

The California Consumer Privacy Act (CCPA), effective July 1, 2020, is a statute intended to enhance privacy rights and consumer protection for residents of California, United States. It applies to companies (regardless of where they are based) who process personal data about individuals in the state of California.

Businesses operating in California are responsible for implementing code to comply with CCPA.

Implementation

If you are calling the App Events API and not sending data directly from user devices, you must either send the client IP address using the HTTP X-Forwarded-For header, or explicitly specify the geography.

Graph API

To implement Data Processing Options using the Graph API, add data_processing_options, data_processing_options_country, and data_processing_options_state to your API call. To explicitly not enable LDU mode, send an empty data_processing_options array:
{
  "event": "CUSTOM_APP_EVENTS",
  "application_tracking_enabled": "1",
  "advertiser_tracking_enabled": "1",
  "custom_events": ["fb_mobile_purchase"],
  "data_processing_options": []
}  
To enable LDU for users with geolocation, you can send an event with the following code:
{
  "event": "CUSTOM_APP_EVENTS",
  "application_tracking_enabled": "1",
  "advertiser_tracking_enabled": "1",
  "custom_events": ["fb_mobile_purchase"],
  "data_processing_options": ["LDU"],
  "data_processing_options_country": 0,
  "data_processing_options_state": 0
}  
To enable LDU for users and specify user geography, you can send an event with the following code:
  {
  "event": "CUSTOM_APP_EVENTS",
  "application_tracking_enabled": "1",
  "advertiser_tracking_enabled": "1",
  "custom_events": ["fb_mobile_purchase"],
  "data_processing_options": ["LDU"],
  "data_processing_options_country": 1,
  "data_processing_options_state": 1000
}  

Mobile SDKs

ImplementationAdding Data Processing Options

iOS SDK (Objective C)

With Objective C, use FBSDKSettings setDataProcessingOptions.


To explicitly not enable Limited Data Use (LDU) mode, use:

[FBSDKSettings setDataProcessingOptions:@[]];

To enable LDU with geolocation, use:

[FBSDKSettings setDataProcessingOptions:@[@"LDU"] country:0 state:0]; 

To enable LDU for users and specify user geography, use:

[FBSDKSettings setDataProcessingOptions:@[@"LDU"] country:1 state:1000];   

iOS SDK (Swift)

With Swift, use setDataProcessingOptions.


To explicitly not enable LDU mode, use:

Settings.setDataProcessingOptions(modes: [])   

To enable LDU for users with geolocation, use:

Settings.setDataProcessingOptions(modes: ["LDU"], country: 0, state: 0)

To enable LDU for users and specify user geography, use:

Settings.setDataProcessingOptions(modes: ["LDU"], country: 1, state: 1000)  

Android SDK

Use the setDataProcessingOptions method.


To explicitly not enable LDU mode, use:

FacebookSdk.setDataProcessingOptions(new String[] {});   

To enable LDU for users with geolocation, use:

FacebookSdk.setDataProcessingOptions(new String[] {"LDU"}, 0, 0);   

To enable LDU for users with a specified geography, use:

FacebookSdk.setDataProcessingOptions(new String[] {"LDU"}, 1, 1000);  

Unity SDK

To explicitly not enable LDU mode, send an event with:

FB.Mobile.SetDataProcessingOptions(new string[] {});

To enable LDU for users with geolocation, send an event with:

FB.Mobile.SetDataProcessingOptions(new string[] {"LDU"}, 0, 0); 

To enable LDU for users and specify user geography, send an event with:

FB.Mobile.SetDataProcessingOptions(new string[] {"LDU"}, 1, 1000);