FB.api(
'/10154092833240172',
'GET',
{"fields":"reactions.type(LIKE).summary(total_count).limit(0).as(like),reactions.type(LOVE).summary(total_count).limit(0).as(love),reactions.type(WOW).summary(total_count).limit(0).as(wow),reactions.type(HAHA).summary(total_count).limit(0).as(haha),reactions.type(SAD).summary(total_count).limit(0).as(sad),reactions.type(ANGRY).summary(total_count).limit(0).as(angry)"},
function(response) {
// посмотрите, что приходит в ответе
console.log(response);
// затем используйте любимый способ для интерполяции данных и html
}
);
<meta property="fb:app_id" content="{YOUR_APP_ID}" />
<meta property="fb:admins" content="{YOUR_FACEBOOK_USER_ID}"/>
<meta name="publisher" content="https://plus.google.com/u/0/100387872068987868033/auto?cfem=1" />
FB.ui(
{
method: 'feed',
name: 'This is the content of the "name" field.',
link: 'URL which you would like to share ',
picture: 'URL of the image which is going to appear as thumbnail image in share dialogbox',
caption: 'Caption like which appear as title of the dialog box',
description: 'Small description of the post',
message: ''
}
);
{
"name" : "post_reactions_by_type_total",
"period" : "lifetime",
"values" : [
{
"value" : {
"like" : NumberLong(1),
"love" : NumberLong(0),
"wow" : NumberLong(0),
"haha" : NumberLong(0),
"sorry" : NumberLong(0),
"anger" : NumberLong(0)
}
}
],
"title" : "Lifetime Total post Reactions by Type.",
"description" : "Lifetime: Total post reactions by type.",
"id" : "<post_id>/insights/post_reactions_by_type_total/lifetime"
}