Facebook FQL for streamlined link_stats

I am trying to get an ordered (decreasing) result set of link_stats for URLs that start with a common substring. I am trying to use the following:

SELECT url,
       normalized_url,
       share_count,
       like_count,
       comment_count,
       total_count,
       commentsbox_count,
       comments_fbid,
       click_count
FROM   link_stat
WHERE  substr(url, 0, 22) = "http://www.example.com";  

but I keep getting the following error message:

Your statement is not indexable. The WHERE clause must contain an indexable column.

Any advice on how to get this working ALONG with additional syntax to order the descent by 'total_count' would be most appreciated.

Thank!

+3
source share
1 answer

url is now indexable . See https://developers.facebook.com/docs/reference/fql/link_stat

Do you use the direct where link for the URL?

SELECT url,
       normalized_url,
       share_count,
       like_count,
       comment_count,
       total_count,
       commentsbox_count,
       comments_fbid,
       click_count
FROM   link_stat
WHERE  url = "www.example.com";  
+1
source

All Articles