Question

I'm doing a query to get the total likes for a domain and I am using the following:

https://api.facebook.com/method/fql.query?query=SELECT metric, value FROM insights WHERE object_id=xxxxxxxxx AND metric='domain_widget_likes' AND end_time=end_time_date('2011-08-27') AND period=period('lifetime')&access_token=xxxxxxxxx

I already claimed my domain, have the object id for my domain and installed an app to get access to insights and send the token.

But return nothing, if I try with period('day') the query works fine but I need all likes not only daily.

Anyone knows if it is a new rule on the insights data or is a bug?

Thanks a lot.

Was it helpful?

Solution

Are you able to use a wildcard % in the query like so (period LIKE period('%')):

https://api.facebook.com/method/fql.query?query=SELECT metric, value FROM insights WHERE object_id=xxxxxxxxx AND metric='domain_widget_likes' AND end_time=end_time_date('2011-08-27') AND period LIKE period('%')&access_token=xxxxxxxxx

String Comparison Functions Reference has more info on query wildcards, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top