How to list facebook users who like a page or interest [duplicate]
Asked Answered
P

6

24

Possible Duplicate:
Retrieve Facebook Fan Names

I wanna get a list of facebook users who like a page or interest.

FQL like 'SELECT user_id FROM like WHERE object_id=113970468613229' does not work.

Is there a way to do this?

Perique answered 23/8, 2010 at 9:37 Comment(0)
B
60

I am Partner Engineer at Facebook so I thought I'd chime in here. The Facebook APIs will not give you the user ID of users who have liked a page or interest, this is to guard the privacy of those users.

Barmy answered 18/7, 2011 at 18:31 Comment(7)
how about the actual NAME of the users?Reggiereggis
Then why can I see the users who like my page under "New Likes" on the actual page? Seems a bit inconsistent to "protect" user privacy in one area but not the other.Coronado
If I can see the likes in the page itself, via browser, but not from the APIs, it's not related to guard the user privacy!Dunois
@Jonathan Dean what the above user said is right. If I can view the user likes of a particular page in my own page then why shouldn't I get it using my codePrimogenial
It's not to guard user's privacy, it's to stop spammers collecting ID's from a targeted page (such as a weight loss page) and spamming them with weight loss products. I learn't this from Facebook's security team. I worked on a bug relating to this some time ago for Facebook.Leesen
@Jonathan So, even for the page_admin also it is not possible to get the User ids of the people who liked his page in API? Could you please let us know whether it is possible for admin to get the page likes info...Illinois
They don't want you to go out of facebook platform. You can see the userid based on likes on facebook itself but not on your own website. If they do, soon traffic will go out of facebook. IMHOKassel
R
11

There is no way to get a list of people that like your page via their API, which is why this question never got answered. You can get charts and aggregate information about who like your page from Facebook Insights but it is not personally identifiable information like their user id.

You can see the most recent 500 users that have like your page by going to: https://www.facebook.com/browse/?type=page_fans&page_id=your page id but you would have to scrape this to get the information and it won't work for more people besides the most recent 500.

Resent answered 14/7, 2011 at 15:53 Comment(1)
This is a good solution, but how can you do it form a HTTP request? I mean, without loggin in..Dunois
R
6

It isn't possible to get the ids of users who like your page unfortunately.

You can use the like box to show a facepile of users who like your page. And as haha said you can detect if one user likes a page.

For the likebox/facepile option check out the docs at: Likebox

Rigveda answered 18/7, 2011 at 18:27 Comment(0)
C
4

According to the facebook api that is exactly how you do it. Except it says you should have quotes around your object_id.

The example says:

$facebook->api_client->fql_query('SELECT user_id FROM like WHERE object_id="122706168308"');

http://developers.facebook.com/docs/reference/fql/like

Catoptrics answered 23/8, 2010 at 9:55 Comment(0)
F
4

The FQL docs have been updated to clarify this limitation: https://developers.facebook.com/docs/reference/fql/like/

Finagle answered 19/7, 2011 at 17:52 Comment(0)
R
-1

With Facebook PHP-SDK you can use this

if($me) {
$youlikeit =  $facebook->api(array(
    "method" => "fql.query",
    "query"  => "select uid from page_fan where uid=me() and page_id=113970468613229"
));
}
$youlikeit = sizeof($youlikeit) == 1 ? true : false;
Ranchero answered 17/4, 2011 at 16:16 Comment(1)
Never mind. It can only check the user is on the user list of a page, not get the user list of a page.Perique

© 2022 - 2024 — McMap. All rights reserved.