fql query not working for insights - facebook-insights

I have tried following queries to get my facebook fan page insights data
SELECT metric, value FROM insights WHERE object_id=2439131959 AND metric='application_active_users' AND end_time=end_time_date('2011-06-26') AND period=period('month')
as well as
SELECT metric, value FROM insights WHERE object_id=111605505520003 AND metric='page_fan_adds' AND end_time=1334905200 AND period=86400
But both are not working. any help will be appreciated . thnks in advance

Make sure your access token has the read_insights permission. Otherwise querying the insights won't return any data.

Related

Why facebook fql query is showing blank result?

I am trying to get like_info of a post in graph explorer by FQL.Like_info/Comment_info/Share_info whatever i query the result is empty.See the image.
https://docs.google.com/file/d/0B9AFKCiUY98WRnhORVFFOVltNEU/edit
Have any idea about it?
I guess you're using the stream table then? Please add some FQL query code so that we can follow what you are trying to achieve!
Notice that you need the read_stream permission with the appropriate access token for the respective User/Page as described here: https://developers.facebook.com/docs/reference/fql/stream/#permissions

FQL: Unable to read data from insights table

I am trying to access our application's insight data with the following request:
https://graph.facebook.com/fql?format=json&access_token=<removed>&q=
SELECT object_id, metric, value FROM insights WHERE metric IN
('application_widget_comments_views',
'application_widget_comments_views_unique',
'application_widget_comments_views_login',
'application_widget_comments_views_login_unique',
'application_widget_comments_views_logout')
AND end_time=end_time_date('2012-08-01')
AND period=period('day')
AND object_id='10151074438279445'
Access token was obtained as an app access token - Does this mean I don't need read_insights permission?
However I always get back an empty data array. To access insights plugin and domain metrics, what should object_id be?
Fetching data from comment, link_stat tables are working just fine.
Any help would be greatly appreciated.
You aren't getting data because the id you are passing is for a url (a Yahoo Finance url). It seems that application_widget_comments_views... only return data when the object_id is the ID for an app.
Looking through the insights table, it does not appear that there are any ways to get insights for a url other than via the url_like table.
If you've got Facebook comments on a url, you'll need to have the id of the app used to publish the comments and be an admin of the app.

FQL how to get the insights for a facebook page

SELECT metric, value FROM insights WHERE object_id=140902935963424 AND metric='page_fan_adds' AND end_time=1334905200 AND period=86400
HI I have wrote a query to get the fan_page_adds insights but the query did not get executed. I cannot see any wrong with it and i used the facebook page id as the object id. Can anyone help?

Facebook Graph Api to read recommendations

While I can access several data using fbgraph api, I couldn't find way to read the "recommendations" data.
For example: For the facebook page www.facebook.com/cozycaterers , its recommendation content appearing on right side below cover photo.
Could someone please help me.
Thanks in advance.
Don't think this is currently possible.
I have checked the Docs for FQL and Graph API with no luck ...
Hopefully facebook will allow access sooner or later
I tried this query with the FQL Explorer:
SELECT review_id, rating, message, reviewer_id FROM review where reviewee_id='492378670299'
It returned results, but not as many as I expected.
If anyone has a better answer, I'd be happy to know...

Get Facebook fan count of age restricted page

I need to get the Facebook fan_count, part of the data returned by the main open graph API call for a page, for an age restricted Facebook page. Anyone know how to do this? For instance: http://graph.facebook.com/BudLight
I think you just need to provide access_token (see "Authentication").
fan_count isn't restricted, and there's no need to provide an access_token.
You just need to query graph by page_id, for example, for BudLight:
http://graph.facebook.com/110515375643035