0

I'm trying to get info about a specific user's ad campaigns using an async request to /reportstats. When I add all fields to the request, everything is fine. But when I remove both total_actions and total_unique_actions, the fields actions_28d_click_by_convs and unique_actions_28d_click_by_convs return the totals instead of an object with a breakdown of totals per action. As soon as you add either total_actions or total_unique_actions back to the list, the two by_convs fields return the expected object.

With 'total_actions':

{  campaign_name: '...',
   campaign_group_name: '...',
   clicks: 337,
   reach: 80564,
   [...]
   total_actions: 335,
   actions_28d_click_by_convs: [Object],
   unique_actions_28d_click_by_convs: [Object]
}

Without 'total_actions':

{  campaign_name: '...',
   campaign_group_name: '...',
   clicks: 337,
   reach: 80564,
   [...]
   actions_28d_click_by_convs: 335,
   unique_actions_28d_click_by_convs: 335
}

Another weird thing: the summary of the response does show an object with the totals (of all campaigns combined) per action (e.g. post_likes).

I've tried this with 2 different users and 2 different apps, and both show the same weird thing. I (temporarily) solved it by just always requesting total_actions.

Anyone else who has the same problem and/or knows the cause?

Thanks!

Nyveria
  • 168
  • 13
  • how did you perform the async request? I'm using the facebook-php-ads-sdk and need to do an async request to get some old data but can't figure out how/where I need to denote the async param – Rodney Jan 06 '15 at 04:03
  • @Rodney Hi, sorry for the late response. I'm using javascript so I don't know if this will help you, but when you make a request to Facebook endpoints, you need to specify some fields like `data_columns`, `time_interval` and the `access_token`. In those options you can also add a parameter: `async` which you set to `true`. – Nyveria Feb 18 '15 at 15:02

0 Answers0