Today we are launching new Page Insights to help Page admins understand how their content resonates with users. Measure everything from the number of stories about a Page to how viral a specific post has become. These new metrics are available today via Insights, FQL and the Graph API. For a list of the new metrics see the Insights FQL table.

Graph API Examples

Getting Page Insights

In order to obtain Page Insights via the Graph API, you must use a Page access token, and you must have the read_insights permission. Click on the link below to see this working in the Graph API Explorer.

In the Graph API Explorer, click the "Get Access Token" button to obtain the read_insights and manage_pages permissions (listed under "Extended Permissions"). Click "Submit" to retrieve the list of Pages that you admin now that you have a valid access token. Page access tokens for those Pages you administer should now be listed. Copy the Page access token for the Page for which you want to retrieve Insights for, and paste it into the Access Token field at the top of the Graph API Explorer. The following examples assume that you are using this Page access token to make requests.

Once you have a list of Page IDs and an access token, you can pull many of the new metrics with a single call:

FQL Example

The examples above are also available via FQL. To obtain unique post impressions, follow the example FQL query below. You will need to obtain the same permissions above: (read_insights and manage_pages).

SELECT metric, value FROM insights WHERE object_id=19292868552
AND metric='page_posts_impressions_unique'
AND end_time=end_time_date('2011-07-18')
AND period=period('days_28')

Snippet of response:

[
{
"metric":"page_posts_impressions_unique",
"value":2922074
}
]

For more information on all the Insights metrics, please visit our Insights documentation. Please let us know if you have any questions in the Comments below.