I’m trying to return campaign insights in the Facebook Marketing API and show the results aggregated for each day and broken down by country.
I’m trying
act_xxxx/?fields=campaigns{name,insights}&time_increment=1&breakdowns=country
but the country and time_increment paramaters don’t seem to affect the results.
I’ve had success with EITHER time_increment of breakdowns if I don’t use the ?fields paramater but then I’m not aggregating at the level I want and can still only use one paramater.
Can anyone suggest anything?
Thanks
James
2
Answers
Managed to figure this one out:
The key things I was missing were:
define the level of aggregation in the ?level paramater return the
Return insights edge before the ?fields paramater rather than through field extension as I did in my example.
all you have to do is
This one fetches all campaigns name and insights between the date interval in day by day manner breaking down according to countries
you can use {} for subfields like
you can use . and () for parameters like; always make sure you use you use fields only after parameters like this order .(){}