Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's possible and not too complicated once you know how to access the insights.</p> <p>Here is how I proceed:</p> <ul> <li>Login the user with the offline_access and read_insights. read_insights allows me to access the insights for all the pages and applications the user is admin of. offline_access gives me a permanent token that I can use to update the insights without having to wait for the user to login.</li> <li>Retrieve the list of pages and applications the user is admin of, and store those in database.</li> <li>When I want to get the insights for a page or application, I don't query FQL, I query the Graph API: First I calculate how many queries to graph.facebook.com/[object_id]/insights are necessary, according to the date range chosen. Then I generate a query to use with the Batch API (<a href="http://developers.facebook.com/docs/reference/api/batch/" rel="nofollow noreferrer">http://developers.facebook.com/docs/reference/api/batch/</a>). That allows me to get all the data for all the available insights, for all the days in the date range, in only one query.</li> <li>I parse the rather huge json object obtained (which weight a few Mb, be aware of that) and store everything in database.</li> <li>Now that you have all the insights parsed and stored in database, you're just a few SQL queries away from manipulating the data the way you want, like displaying charts, or exporting in CSV or Excel format.</li> </ul> <p>I have the code already made (and published as a temporarily free tool on <a href="http://www.social-insights.net" rel="nofollow noreferrer">www.social-insights.net</a>), so exporting to excel would be quite fast and easy.</p> <p>Let me know if I can help you with that. It can be done before the week-end.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload