My idea is to implement something like this:
http://i.imgur.com/MHJrY.png
screenshot is from here: http://www.thedrum.co.uk/opinion/2012/03/08/five-ways-new-facebook-timeline-will-impact-brands
I've read that I have to use either Facebook graph API or FQL but I don't know which one is the best.
This is what I have so far but it takes a long to do it so my guess is that is the wrong method:
<? require_once 'libs/facebook.php';
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => 'appid',
'secret' => 'secret',
'cookie' => true,
));
$result = $facebook->api(array(
'method' => 'fql.query',
'query' => 'SELECT share_count, like_count, comment_count, total_count FROM link_stat WHERE url="URL";'
));
echo '<p>'.$result[0]['like_count'].' likes';
?>
Is it OK if I try to get the share count (using one of the methods mentioned before) of let's say 50 different posts I have on my home page? Doesn't Facebook have a limit for this?