5

Is it possible to query more than one insights metric in one API call?

For example to get the daily added likes for a page I executed the following call:

https://graph.facebook.com/_object_id_/insights/page_fan_adds_unique/day/

But I would like to have another metric, e.g., page_fan_removes_unique, included as well.

Query the insights object entirely is a possibility, but gives me too much data I don't need, thus decreases performance.

Jeroen Bolle
  • 1,836
  • 1
  • 12
  • 15

2 Answers2

2

Since your question shows that you're using the Graph API, you may want to use the batch requests method: http://developers.facebook.com/docs/reference/api/batch/

You can group multiple Graph API queries together so you can just query the Insights data you need in one request.

Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
1

Yes, you can run a multiple FQL query in one API call and then parse the various results.

multi query: http://developers.facebook.com/docs/reference/rest/fql.multiquery/

insights table: http://developers.facebook.com/docs/reference/fql/insights/

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • 2
    FQL is no longer supported beyond version 2.0. Also, the multiquery link is dead. – frederix May 14 '15 at 23:32
  • both links look dead now, would have been nice to include some info here rather than just pasting a link – tanvi Nov 11 '19 at 21:51