Get all Facebook friends that like a specific page - facebook

is there an easy way to get all Facebook friends that like a specific Facebook page?
I know that there is this site here
https://www.facebook.com/browse/friended_fans_of/?page_id=245323855526590
Where you can type in the page_id and get all friends that like this. But is this also possible with the Graph API? Or would I need to go every friend of a user, using the correct permission and THEN check if the user likes a specific page? I couldn't find an API Endpoint in the API Reference of Facebook

Related

fb graph api multiple userid and page like

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.

GET List Likes Using Graph API Explorer

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.

How can I get the details of all fans of a Facebook page?

Suppose that I am the administrator of a Facebook page, I want to get all of the profile details of a the people who "liked" my page. Is this possible? How?
So far, I have only been able to get aggregated data through the Graph API. For example, "number of like in the past week".
There are posts that claim that I can do this with the FQL API, but the documentation for the FQL seems to have been hidden on FB developer site.
FQL reference is not "hidden", it's here: https://developers.facebook.com/docs/reference/fql But there's no current official way to get the profile details of your Page's liker, because you'd need the permission to query the user data from the users.
There are some "hacks" as denoted at Facebook API: Get fans of / people who like a page for example, but it's strongly advised that you don't use these. Facebook forbids scraping for example, and once Facebook changes its website, those methods are likely to stop working.

Facebook : List of all pages liked by

I am new to Facebook's Graph API and FQL. I want small information about the same.
I want to get List of all pages liked by any particular user.
I have used Graph API just to allow user to get logged in with their Facebook ID and Can access their wall but don't know much about rest of the this.
I searched on Google for same but got information about list of pages that user administrate that I don't want, I want full list which is like by them.
It's a connection property of the User object.
https://developers.facebook.com/docs/reference/api/user/#likes

Retrieve total number of friends a registered user to a facebook app

i have a facebook app, in wich the administrator of the app needs a report of the users registered to this app and one of the data i need is to get how many friends does a user registered to my app has, i was trying with fql using a query like this
$facebook->api_client->fql_query("select uid2 from friend where uid1=$userId");
but is not working, is there any other way to achieve this?
I remember the facebook API Documentation to be rather sparse with this sort of thing, but maybe you want to look into the facebook Graph API. From there, you can get registered users of your application.
Facebook 'Friends.getAppUsers' using Graph API
http://developers.facebook.com/docs/api
==EDIT==
Facebook Graph API pattern:
https://graph.facebook.com/ID/CONNECTION_TYPE
If you want all the friend data from any user, you can use
https://graph.facebook.com/USER_ID/friends