How to get most commented pages on your website? - facebook-fql

I am having a problem getting the most commented pages on my site. I wanted to return list of pages sorted by their comment count.
I have tried this one. But this is not efficient for me I have a lot of pages.
SELECT url, normalized_url, share_count, like_count, comment_count, total_count,
commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url IN ( "url",
"url2") LIMIT 10
Are there other ways to get this?

There are no ways via the API to query the most commented pages on your website. If you have Insights integrated into your website you can make a close approximation.

Related

Facebook link_stat Incorrect Unique URL Stat

I'm using this FQL to get the number of likes of every article in my app.
SELECT share_count, like_count, comment_count, total_count FROM link_stat WHERE url="http://www.example.com/some/dir/slug"
However, I've been noticing that the number and the like button doesn't seem to take the slug into factor. So when I'm debugging it in Graph API Explorer, the stat for http://www.example.com/some/dir/slug and http://www.example.com/some/dir is the same.
Is this FB bug?
Thanks
The og:url meta tag has to contain the individual URL for each article - otherwise, if it is the same URL value for all articles, Facebook will count all likes for that very URL.

How to get top 30 most liked urls on my website (FQL)

I'm upgrading my webshop and it involves doing some changes in my product url's (because of SEO optimizing). Since there doesn't seem to be anyway of migrating likes from one url to another and "tricking" the likes to the old url with 301 redirecting is out of the question, i was trying to get a list of the top 20-30 liked urls so i could then loop the result to find the amount of likes, shares etc.
I have already built a small script that finds the like, share etc count for a certain url, but i am unable to find out what the most liked url's are!
Thanks a bunch!
It's possible, but not easy. You'll need to build an FQL query like this:
SELECT url, normalized_url, share_count, like_count, comment_count, total_count
FROM link_stat
WHERE url IN ("example.com/url1", "example.com/url2", ... "example.com/urln")
ORDER BY like_count DESC

Facebook sharing data for url

I am working on a project to get shares for different articles of the client. I searched whole internet but did not find any info so as a last resort putting the question here:
Is there a way to check how many shares an article has on facebook by giving just the url of the article? I have seen code on facebook where you can get number of likes for your own article you paste but is there a way to tell lets say if some techcruch article has how many facebook shares?
Here is the reference:
https://developers.facebook.com/docs/reference/fql/link_stat/
Sample query to get number of shares for a Techcrunch article:
SELECT url, normalized_url, share_count, like_count, comment_count,
total_count, commentsbox_count, comments_fbid, click_count FROM
link_stat WHERE
url="http://techcrunch.com/2012/07/25/zipongo-seed-round/"
You can play around with different queries here:
https://developers.facebook.com/tools/explorer
(choose FQL from the menu)

How to get the total number of likes & comments about particular post?

I want to get the total number of like & comments for a particular post on my website, for eg. if my website has 100 pages, I integrate facebook like button on every page, how can i get the number of likes related to that page or post? I have take a look a GRAPH API, but i did n't find any thing relating to my issue.
Check this
Facebook documentation
simply use this javascript code. (change the url)
FB.api({
method: 'fql.query',
query: 'SELECT url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url="http://www.facebook.com"'
}, function(response){});

fql like count limit

Is there same restriction to use FQL to get likes count for some urls?
SELECT url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url in ("site.com/page1.html","site.com/page2.html")
I want to get an likes count for thousends of urls in my domain. I will run it from cron script in every night (server is in Europe), but I'm afraid that facebook will ban my ip/server after such us mass request.
The HTTP Get command has a max limit length that might get in your way before Facebook might.
http://social.technet.microsoft.com/Forums/en-US/fastsharepoint/thread/b193fc10-3c39-43d3-9e4a-378ff90125f2