21

I'm trying to grab the names of fans of a Facebook fan page that I administer. I've done some snooping around, and apparently, the FB API doesn't support that, but Facebook actually uses AJAX/JSON to populate the list. Anyways, can anyone suggest a way to make that call myself and grab the data as plain text?

Also, I've found a hack that a guy wrote in Ruby, but I am completely unfamiliar with the language.

Thanks for the help in advance!

cdmckay
  • 31,832
  • 25
  • 83
  • 114
saibot
  • 376
  • 1
  • 2
  • 10

6 Answers6

6

At the current time the FQL schema would suggest that there is no way to get a collection of FANS for any given PAGE. I think they are hiding this information because they display the FANS on the page... One would think that at least the ADMIN would have privileges to see the list of users.

Anyway... I hope someone make is possible in the near future.

Richard
  • 10,122
  • 10
  • 42
  • 61
5

can you please try this and let me know :

select uid,name from user where uid in ( select uid from page_fan where uid in (select uid2 from friend where uid1 = me()) and page_id = 'Your Page Id')

I think you can get it only for the currently logged in user and his / her friends only.

Clive
  • 36,918
  • 8
  • 87
  • 113
P.V
  • 63
  • 1
  • 4
  • 1
    This works, but it's pretty useless - it just gets a list of your friends who have also liked the page. – Kon Aug 08 '11 at 21:53
  • It Works. It gives uid and name. From uid you can access required user's details. Thanks. – Amit Patel Jan 05 '13 at 10:38
3

If you have less than 500 fans, you can use the following url:

http://www.facebook.com/browse/?type=page_fans&page_id=13207908137&start=400

Each page will give you 100 fans. Change &start to (0, 100, 200, 300, 400) to get the first 500. If &start is >= 401, the page will be blank :(

Vjeux
  • 5,756
  • 4
  • 31
  • 24
  • 2
    Another thing to note is that this gives you the most recent fans/likes list, so if you keep polling even &start=0 regularly, you'll get everything... provided you run the script from day one. – aalaap Nov 10 '11 at 09:31
  • 1
    Its against the [Facebook platform policy](https://developers.facebook.com/policy/) to scrape a Facebook page for information. – Lachlan McDonald Mar 02 '12 at 05:21
  • This may be obvious, but the ID needs to be replaced by your page's page ID. You can find your page ID here: http://findmyfacebookid.com/ – philipthegreat Jul 23 '14 at 18:57
  • @philipthegreat the pageid tool loooks like broke, Got it from here - https://findmyfbid.in – user2475624 Jul 25 '19 at 09:33
-1
SELECT first_name, last_name FROM user WHERE uid IN (SELECT uid FROM page_fan WHERE page_id = [your page id])

This should work, but I get an error trying to run this through the .net facebook api...something about the where clause not being on an indexable column, which it is.

Perhaps give that a try on your platform.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
ScottE
  • 21,530
  • 18
  • 94
  • 131
  • 1
    Nah, the page_id isn't an indexable column on the page_fan table. As seen here: http://developers.facebook.com/docs/reference/fql/page_fan. Only * columns are indexed. – ajbeaven Aug 05 '10 at 00:03
-1

I found that in the doc: http://developers.facebook.com/docs/reference/fql/page_fan/

uid - "The user ID who has liked the Page being queried."

Zsolt Takács
  • 368
  • 4
  • 14
-2

That one worked

SELECT user_id FROM like WHERE object_id="YOUR PAGE ID"
Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
  • 2
    object_id doesn't work for page ids... "The object_id of an object on Facebook. This can be a video, note, link, photo, or photo album." https://developers.facebook.com/docs/reference/fql/like/ – billy Sep 10 '11 at 22:29