0

With the old /reportstats endpoint you could fetch actions grouped per target name by adding action_target_name to the group options. This would give you a list of targets and their actions. In the new API endpoint /insights, only action_target_id is available as group option. The target can be anything, e.g. a post, a pixel, etc. but there is no type indication returned, so all you have is an ID and some actions...

So, when grouping actions by action_target_id, is there any way to get the target's name that belongs to the ID?

Nyveria
  • 168
  • 13
  • Assuming you have permission to see the items, you can make another call to fetch the names (and pictures, other metadata) of the IDs returned in the report - you'll likely need to do that anyway unless the name is the only field you were using from the promoted object's details – Igy Oct 30 '15 at 00:24
  • Hi @Igy, thanks for your reply! The name is in fact the only field I was using and needed from the promoted object's details. This is why the `action_target_name` group option was so perfect. :) Where can I make a call to in order to get the names? – Nyveria Oct 30 '15 at 08:21
  • 1
    most objects when retrieved include the name and ID by default, and most objects are accessible by ID directly, so if you get 12345, a call to /v2.5/12345 will return the id and name - you can ask for the other fields you want explicitly with the 'fields' param – Igy Nov 17 '15 at 03:45
  • Thanks @Igy, will implement that then. :) – Nyveria Nov 18 '15 at 14:27

0 Answers0