facebook / facebook-ruby-business-sdk

Ruby SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
204 stars 161 forks source link

FacebookAds::ClientError Limited Data Use Selection Required #104

Closed PlugIN73 closed 3 years ago

PlugIN73 commented 4 years ago

Which SDK version are you using?

facebookbusiness (0.7.0.2)

What's the issue?

I'm sending custom event as described in exmples. Firstly it was ok, but a few days later, I encounter that all of my events failed with FacebookAds::ClientError: Invalid parameter: Limited Data Use Selection Required (fbtrace_id: ...).

Steps/Sample code to reproduce the issue

      user_data = FacebookAds::ServerSide::UserData.new(user_data)

      event = FacebookAds::ServerSide::Event.new(
        event_name: name,
        event_time: Time.current.to_i,
        user_data: user_data,
        custom_data: custom_data
      )

      request = FacebookAds::ServerSide::EventRequest.new(pixel_id: configus.facebook.ads.pixel_id, events: [event])
      request.execute

Observed Results:

Events didn't send and failed with strange error. I can't find any information about this error.

Expected Results:

Events must be delivered.

PlugIN73 commented 4 years ago

I found answer here

To support businesses with their compliance efforts, we’re introducing a new feature businesses can use to limit how we use the data they send to Facebook, called Limited Data Use.

Frontend and Server side options are described here

tltr: we can disable this feature via empty array passed to data_processing_options parameter.

{
    "data": [
        {
            "event_name": "Purchase",
            "event_time": <EVENT_TIME>,
            "user_data": {
                "em": "<EMAIL>"
            },
            "custom_data": {
                "currency": "<CURRENCY>",
                "value": "<VALUE>"
            },
            "data_processing_options": []
        }
    ]
}
stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.