Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get page total count of page likes in facebook api v2.8 [duplicate]

https://developers.facebook.com/docs/graph-api/reference/v2.8/object/likes

total_count property: Total number of people who liked. This is only returned when the flag summary=true is set.

I am wondering where to set summary=true

I am using FB node module

Following is my code snippet

FB.api('xxxxx', {
    fields: ['id', 'name', 'likes', 'checkins', 'talking_about_count'],
    access_token: accessToken
}, function(res) {
    console.log(res);
});
like image 775
Krunal Shah Avatar asked Dec 08 '22 20:12

Krunal Shah


1 Answers

You can use the fan_count field of the Page object.

See

  • https://developers.facebook.com/docs/graph-api/reference/page/#Reading
like image 174
Tobi Avatar answered Apr 20 '23 00:04

Tobi