I have a user's manage_pages permission and I can access the user's page info.
Is there a way that I can get the list of users who liked this page ?
When I go to /me/likes with the page's access_token I only see the pages who liked this page.
How can I see the regular users who liked it ?
For privacy reasons, it´s not possible to get a list of all the fans of a Page. You would not be allowed to do anything with the list anyway (send them stuff and whatnot). A user should only be known by an App if that specific user authorized the App.
More information can be found in several other threads about this question:
Querying Users who 'like' my Facebook Page
Facebook FQL get the list of fans of a facebook page
...
GET /v8.0/{page-id}/?fields=fan_count HTTP/1.1
Host: graph.facebook.com
https://developers.facebook.com/docs/graph-api/reference/page#public-page-data
Related
from my ios app after fb login, facebook returns me the userid.
i call https://graph.facebook.com/v2.8/me/likes/[pageid]?access_token=...
to check if the user likes my fb page. But i get empty array while the same user has liked my page from the web.
The user has different userId when logins directly to facebook website and different when logins in my app. While the user has liked my page from web , how can i see it in the api call from my app using the userid that fb returns me when he logins from my app?
Thank you very much
Please note that there is no direct way of checking whether a particular user has liked a certain page or not using FB Graph API.
But i believe there is a workaround for this and you can try to hit the below URL in your browser
https://www.facebook.com/search/<page_id>/likers?ref=about
It will return all the people information who have liked the page provided. I am not sure would this return all the results or just some of them. But i believe you can try this.
You can then do some web scraping which will help you indentify whether 'person A' has liked a page say 'abc'.
Now you can hit the below endpoint to retreive all the likes this 'person a' has liked
FB.api('/person_id_obtained_from_above/likes')
But please note that you need user_likes permission to retrieve someone else's likes
Let me know if this worked for you.
I want to search the user's list of likes, to know if he liked my page or not
https://graph.facebook.com/v2.10/me/likes
I also want to know I did not follow my profile or not
https://graph.facebook.com/v2.10/me/???
There is no way to check if someone follows your profile. For getting to know if a user likes your page, you would need to authorize that user with the user_likes permission.
To check if the user likes your page without going through the whole list, you can use the following API endpoint: /me/likes/[page-id] ... if it returns something, the user liked the Page.
I have a user's manage_pages permission and I can access the user's page info.
Is there a way that I can get the list of users who liked this page ?
When I go to /me/likes with the page's access_token I only see the pages who liked this page.
How can I see the regular users who liked it ?
For privacy reasons, it´s not possible to get a list of all the fans of a Page. You would not be allowed to do anything with the list anyway (send them stuff and whatnot). A user should only be known by an App if that specific user authorized the App.
More information can be found in several other threads about this question:
Querying Users who 'like' my Facebook Page
Facebook FQL get the list of fans of a facebook page
...
GET /v8.0/{page-id}/?fields=fan_count HTTP/1.1
Host: graph.facebook.com
https://developers.facebook.com/docs/graph-api/reference/page#public-page-data
Is it possible to get the identities of users who have liked a page through the Facebook graph api? If so, what access permissions are required?
I have only been able to get the count via the /user edge.
That other thread got one answer that is correct:
Although you can't get a list of all the fans of a Facebook Page, you can find out whether a specific person has liked a Page.
Source: https://developers.facebook.com/docs/graph-api/common-scenarios
I have a simple tab page, php sdk working and I know I can get the "like" for this specific page from the user signed_request.
This page is a colaboration with another company who also has an FB page. What i´d like to know is if I can get the like status of their page for the current user so I can authorize an action on this tab that is dependant of the user liking both my page and my partner´s.
Is this possible without using an actual app, an access_token and the appropriate perms requested?
e.g. my page is fb.com/Coke and my partner is fb.com/Target
On this specific tab page I want to enable a button only if me (Coke) is liked (which I can get already) and if my partner (Target) is also liked.
I tried the graphAPI (me/likes) and FQL (using the connection table) and both compalin of an unauthorized request.
Short Answer:
No, this will not be possible in a production setting.
Further explanation:
Some users have their list of likes as public. In that case, it would work.
But in order to get likes from a user that has that setting as anything but public (such as myself, only friends of friends can see it), then it requires an app and an access_token that has a user_likes permission.
From the documentation:
Permissions Required:
user_likes permissions if querying the current user.