4

I'm getting an odd error from the Facebook ADs API. Sending the following payload:

{
  "campaign_group_id": "54321",
  "bid_type": "ABSOLUTE_OCPM",
  "name": "Hello AdCampaign",
  "bid_info": {
    "ACTIONS": 1
  },
  "targeting": {
    "behaviors": [
      {
        "name": "BEHAVIOR NAME",
        "id": 12345
      }
    ],
    "geo_locations": {
      "countries": [
        "US"
      ]
    },
    "page_types": "feed"
  },
  "campaign_status": "ACTIVE",
  "daily_budget": 100
}

Providing this payload to the ads api is returning the following error message:

You are requesting a transaction which requires the adgroups to be normalized, but normalize failed because Normalization expects a collection

Which has an associated error code of 1487079 which.. I cannot find documentation for.. ANYWHERE.

This will work, if I remove the behaviors attribute of targeting.. but of course that isn't desirable. So it's something to do with the behaviors.

Rabbott
  • 4,282
  • 1
  • 30
  • 53

1 Answers1

3

As per the docs, I believe page_types should be a list. Try this:

{
    ...
    "page_types": ["feed"],
    ...
}
Craig Labenz
  • 2,489
  • 3
  • 22
  • 17
  • 3
    What an insane error.. completely unrelated and undocumented error message! Thanks Craig! – Rabbott Oct 31 '14 at 17:58
  • I find that if I try to replicate a request in the Graph API Explorer that I can see two error codes. 1487079 sounds like what I've seen referred to in the response as a "suberror" code. The Graph API Explorer will show a main response error code which is often documented at https://developers.facebook.com/docs/reference/ads-api/error-reference/ – bjeavons Nov 03 '14 at 00:18