Recommendation is how. You can see it in a link to a button like:
action- a verb to display on the button. Options: how, recommend
To get the counts for the url (here http://stackoverflow.com), you can make an FQL call:
SELECT url, share_count, like_count, comment_count, total_count
FROM link_stat WHERE url="http://stackoverflow.com"
Direct call
$fql = 'SELECT url, share_count, like_count, comment_count, total_count
FROM link_stat WHERE url="http://stackoverflow.com"';
$json = file_get_contents('https://api.facebook.com/method/fql.query?format=json&query=' . urlencode($fql));
And $jsonwill contain:
[
{
"url" : "http://stackoverflow.com",
"share_count" : 1353,
"like_count" : 332,
"comment_count" : 538,
"total_count" : 2223
}
]
You have here:
share_count: stock count for URLlike_count: number of likes (= recommendations)comment_count: The number of comments on Facebook below the shares of this link.total_count: abstract sum 3 is considered
You can read json in PHP with json_decode:
$data = json_decode($json);
echo $data[0]->like_count;
PHP PHP SDK
EDIT: , , , PHP PHP SDK (. github), FQL: Facebook ( ) API (. Facebook). , : SDK .
require "facebook.php";
$facebook = new Facebook(array(
'appId' => YOUR_APP_ID,
'secret' => YOUR_APP_SECRET,
));
$fql = 'SELECT url, share_count, like_count, comment_count, click_count, total_count
FROM link_stat WHERE url="http://stackoverflow.com"';
$result = $facebook->api(array(
'method' => 'fql.query',
'query' => $fql,
));
$result , ( like_count) :
Array (
[0] => Array (
[url] => http:
[share_count] => 1356
[like_count] => 332
[comment_count] => 538
[click_count] => 91
[total_count] => 2226
)
)