1

I am trying to retrieve metrics post_impressions_unique, post_consumptions or anything started with a post but Facebook always return empty array for me.

Anyone know what is the problem here?

César
  • 9,939
  • 6
  • 53
  • 74
Alvin Lew
  • 11
  • 1
  • 3

3 Answers3

2

Are you sure you have the right permissions?

You need read_insight permissions to view post impressions using fql or the graph api.

Here is more information Facebook Developer Guide

MEURSAULT
  • 8,307
  • 4
  • 24
  • 23
  • Yes I have the permission, I can view other metrics without issue such as page_views/page_stories, only those start with post_something. – Alvin Lew Dec 12 '11 at 01:54
0

Make sure you pass in the entire object ID of the post. It will be of the format pageid_postid (eg. 24379523495_8924592457245) and you need to quote it in single quotes - otherwise you'll get an error about an unexpected underscore.

Mason
  • 8,767
  • 10
  • 33
  • 34
0

As well as needing the read_insights permission, this information is only available for posts made by your page, so check you're actually checking the right posts

Igy
  • 43,710
  • 8
  • 89
  • 115
  • yup, the object ID is correct, I can retrieve all the entries in "stream" and their impression. But when I try to retrieve post_impressions metric from insight table, it return empty array without any error. – Alvin Lew Dec 12 '11 at 01:56