Reputation: 155
I am trying to get the number of likes for Facebook Pages searched by a keyword.
https://graph.facebook.com/search?q=paul&type=page&fields=likes&access_token=xxx
I have tried with two different tokens (with no data permissions),
1) generated from Facebook Graph API Explorer, and
2) generated from Facebook Login Button (after developing a facebook app).
The above API request gave total number of likes when the first token is used.
first token response
And it gave likes object with paging(without total likes) when the second token is used.
second token response
I need to get total number of likes for a page when the second token is used. Can someone help me, or shed some light?
Upvotes: 0
Views: 497
Reputation: 74014
It is fan_count
, not likes
(since v2.6 of the Graph API):
/search?q=paul&type=page&fields=fan_count
You are most likely using different API versions.
Check out the API reference for the existing fields: https://developers.facebook.com/docs/graph-api/reference/page/
Upvotes: 0