Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameters on Nested Facebook API Request?

I am trying to make a call to Facebook using their Graph API Explorer, to try and find the following information about an ad:

  1. Its adset,
  2. Its branded page (if any),
  3. Insights about its 100% video views.

To do that, I have constructed the following URL:

act_1234/ads?fields=id,adcreatives{branded_content_sponsor_page_id},insights{video_p100_watched_actions}&limit=1000

However, when I receive back the insights list, it is giving me just one row, for the last month. If I was making a call directly to insights, I would add the 'timeincrement=1' parameter to separate this out by day. Is there a way to add second-tier parameters to a nested query like this?

like image 926
Brisbe Avatar asked Feb 15 '26 04:02

Brisbe


1 Answers

You can pass parameters to nested queries this way:

act_1234/ads?fields=id,adcreatives{branded_content_sponsor_page_id},insights.fields(video_p100_watched_actions).date_preset(lifetime).time_increment(1)
like image 81
user11475417 Avatar answered Feb 17 '26 20:02

user11475417



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!