Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Marketing API returns error on "breakdowns call"

I'm trying to make an API call with the folowing URL

act_XXXXXXXX/insights?fields=ad_id,clicks,unique_clicks,impressions,reach,spend,date_start,date_stop,actions,action_values,unique_actions,account_id&level=ad&breakdowns=platform_position&time_range={"since":"2019-09-07","until":"2019-09-07"}

and the response is :

{
  "error": {
    "message": "(#100) Current combination of data breakdown columns (action_type, platform_position) is invalid ",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": "XXXXXXXXXXXXXXXXXXXX"
  }
}

the reason is in "breakdown" value = "platform_position" but the problem is that I need exactly that breakdown :(

when I do an API call and change "breakdown" in URL to something else, for example to "publisher_platform":

act_XXXXXXX/insights?fields=ad_id,clicks,unique_clicks,impressions,reach,spend,date_start,date_stop,actions,action_values,unique_actions,account_id&level=ad&breakdowns=publisher_platform&time_range={"since":"2019-09-07","until":"2019-09-07"}

it is OK and responds with data. I don't know why it happens because I'm not specifying any "action_type" breakdown but it tells that I am :(

What I've tried: I tried to remove all the parameters from that URL one by one but it still returns an error

The main questions are: why the API call for "breakdown" value = "platform_position" fails and how to make it work.

Thanks. PS: you can use FB API testing tool to test requests to FB api. I'm using API version v8.0

like image 729
Oleksandr Grin Avatar asked Jun 20 '26 21:06

Oleksandr Grin


1 Answers

You will need both publisher and position:

breakdowns=publisher_platform,platform_position

like image 68
Kris Avatar answered Jun 22 '26 11:06

Kris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!