I think the Social Context API might be the right thing for you, if you're mainly interested in the number of friends which like a certain Facebook Page.
See https://developers.facebook.com/docs/facebook-login/social-context/v2.0
Use
GET /cocacola?fields=context.fields(friends_who_like)
to see which/how many of your friends like the CocaCola Page.
The result will look like
{
"context": {
"friends_who_like": {
"data": [
{
"id": "123456789",
"name": "Firstname Lastname"
}
],
"paging": {
"cursors": {
"before": "ODQ5MDkwMjQ2",
"after": "ODQ5MDkwMjQ2"
}
},
"summary": {
"social_sentence": "4 of your friends like this.",
"total_count": 4
}
}
},
"id": "40796308305"
}
The context.summary.total_count
field will contain the number of friends which like the Page.
Try it here: https://developers.facebook.com/tools/explorer?method=GET&path=cocacola%3Ffields%3Dcontext.fields(friends_who_like)&version=v2.0
Keep in mind that
In order for a person to be identifiably returned in a context edge, they must have:
- Logged into the app.
- Granted the user_friends permission.
- Granted the appropriate content permission in order to see the action. For example, to appear in the friends_who_like context edge, each friend has to have granted the app the user_likes permission.