Steve Nay
Steve Nay

Reputation: 2829

Get list of friends who "like" a page

I need to get a list of a Facebook user's friends who "like" a page. This would be similar in behavior to the "Like" button that you can put on your website--if any of your friends like the page, it will list some (or all) of their names.

How would I do that (with FQL or otherwise)?

Upvotes: 0

Views: 3744

Answers (2)

SeongSu
SeongSu

Reputation: 96

This FQL can get friend's link list. But it's too slow....

 SELECT url,user_id FROM url_like WHERE user_id in (SELECT uid2 FROM friend WHERE uid1 = ... ) and url = 'http://facebook.com'

Upvotes: 1

Elad Lachmi
Elad Lachmi

Reputation: 10561

You need to use FQL, something like this:

select user_id from like where object_id = <page ID> and user_id in (select uid1 from friend where uid2 = <the user id you want to know about>;

Upvotes: 0

Related Questions