Retrieve Facebook Fan Names

28,528

Solution 1

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.

Solution 2

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.

Solution 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 :(

Share:
28,528
saibot
Author by

saibot

I like Javascript, jQuery, PHP and having fun doing things. I am a graphic designer and I have 2 cats.

Updated on July 09, 2022

Comments

  • saibot
    saibot almost 2 years

    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!

  • ajbeaven
    ajbeaven almost 14 years
    Nah, the page_id isn't an indexable column on the page_fan table. As seen here: developers.facebook.com/docs/reference/fql/page_fan. Only * columns are indexed.
  • Kon
    Kon over 12 years
    This works, but it's pretty useless - it just gets a list of your friends who have also liked the page.
  • billy
    billy over 12 years
    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." developers.facebook.com/docs/reference/fql/like
  • Patricia
    Patricia over 12 years
    This doesn't really answer the question at all. he's looking for the users names, not the id.
  • aalaap
    aalaap over 12 years
    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.
  • Lachlan McDonald
    Lachlan McDonald about 12 years
    Its against the Facebook platform policy to scrape a Facebook page for information.
  • Jack Marchetti
    Jack Marchetti about 12 years
    can't you get the user's names from the UID?
  • Amit Patel
    Amit Patel over 11 years
    It Works. It gives uid and name. From uid you can access required user's details. Thanks.
  • philipthegreat
    philipthegreat almost 10 years
    This may be obvious, but the ID needs to be replaced by your page's page ID. You can find your page ID here: findmyfacebookid.com
  • user2475624
    user2475624 almost 5 years
    @philipthegreat the pageid tool loooks like broke, Got it from here - findmyfbid.in