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

≡放荡痞女 提交于 2019-12-17 06:39:22

问题


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?


回答1:


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.




回答2:


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.




回答3:


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




回答4:


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




回答5:


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




回答6:


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;


来源:https://stackoverflow.com/questions/3546320/how-to-list-facebook-users-who-like-a-page-or-interest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!