How to extract facebook page likes?

22 replies
Anyone know how to do this? Can't seem to find any tool which can do this. The best tool I know which can do this has a number limit. Would appreciate anyone who can help me figure out how to extract all facebook page likes and get their profile ID. Please feel free to post here or PM me. Thanks!
#extract #facebook #likes #page
  • Profile picture of the author adam232
    if you find the solution from a pm from others please share with rest of us in the group we also wanna know
    {{ DiscussionBoard.errors[8955142].message }}
  • Profile picture of the author brutecky
    You cant extract a pages likes with the Graph API. The best you can do is get active users (people who have liked recent posts)
    {{ DiscussionBoard.errors[8955174].message }}
  • Profile picture of the author Racingheart
    Hi, thanks for all the replies. To answer darkcode, no I am not using any Facebook ads for this. Adam, I've been researching on this for months and weeks but I cannot find any success to this. Brutecky, I don't want to extract my page likes with the Graph API. What I am looking at is to export all my facebook page likes to a database of excel sheet e.g getting each and every single one of my facebook fans' profiles ID. I understand your second point but my page has about 500,000 likes and the reason why I need to extract all these likes is because I believe there are a lot of untapped customers who aren't active enough so I will like to target them.
    {{ DiscussionBoard.errors[8955200].message }}
    • You can test out the suggestions of some users in this thread (I'd probably have time to also look closer into these suggestions some time next weekend): Querying Users who 'like' my Facebook Page - Stack Overflow
      Signature
      • Deep Learning & Machine Vision Engineer: ARIA Research (Sydney, AU)
      • Founder: Grayscale (Manila, PH) & SEO Campaign Manager: Kiteworks, Inc. (SF, US)
      {{ DiscussionBoard.errors[8955390].message }}
      • Profile picture of the author Racingheart
        Originally Posted by Marx Vergel Melencio View Post

        You can test out the suggestions of some users in this thread (I'd probably have time to also look closer into these suggestions some time next weekend): Querying Users who 'like' my Facebook Page - Stack Overflow
        Hi Marx thanks, this is exactly what I wanted!

        List of (all) users who like my facebook page, and
        Additional information those users have made publicly available (beyond first and last name)
        You can see that this question was posted by the OP on 3rd March 2011 which was 3 years ago! And up till today, there is no solution to this. I remember there was an exploit on Facebook a few years ago where you can export all your page likes to an excel but Facebook patched it 2 weeks later.

        I saw some of the latest replies on that site and I am not sure how that graph search is going to work. And there is this user who claimed to have made a homemade code which is able to extract all UID from the facebook page likes. My programming skills are limited so I am not sure if I am able to do that. And taking into account some of my colleagues who have no programming experience, how can they do this?

        Hope to hear some good news from you regarding this next week!
        {{ DiscussionBoard.errors[8955405].message }}
  • Profile picture of the author r0dvan
    Try this code.. it might get some.
    Sorry if this post should be on developer section, but it has to do with your topic.
    function fetch_fb_fans($fanpage_name, $no_of_retries = 10, $pause = 500000 /* 500ms */){
    $ret = array();
    // get page info from graph
    $fanpage_data = json_decode(file_get_contents('http://graph.facebook.com/' . $fanpage_name), true);
    if(empty($fanpage_data['id'])){
    // invalid fanpage name
    return $ret;
    }
    $matches = array();
    $url = 'http://www.facebook.com/plugins/fan.php?connections=100&id=' . $fanpage_data['id'];
    $context = stream_context_create(array('http' => array('header' => 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0')));
    for($a = 0; $a < $no_of_retries; $a++){
    $like_html = file_get_contents($url, false, $context);
    preg_match_all('{href="http://www\.facebook\.com/([a-zA-Z0-9._-]+)" data-jsid="anchor" target="_blank"}', $like_html, $matches);
    if(empty($matches[1])){
    // failed to fetch any fans - convert returning array, cause it might be not empty
    return array_keys($ret);
    }else{
    // merge profiles as array keys so they will stay unique
    $ret = array_merge($ret, array_flip($matches[1]));
    }
    // don't get banned as flooder
    usleep($pause);
    }
    return array_keys($ret);
    }

    print_r(fetch_fb_fans('Airnovapl', 2, 400000));
    // prints 112 unique fan names as array
    Signature
    LeadGen.tools - Lead Generation Search Engine from any Network and many useful tools. FREE trial.
    {{ DiscussionBoard.errors[8955398].message }}
    • Profile picture of the author Racingheart
      Originally Posted by r0dvan View Post

      Try this code.. it might get some.
      Sorry if this post should be on developer section, but it has to do with your topic.
      Hi r0dvan, thanks for this! This code doesn't seem to come from the website Marx just posted. If you don't mind me asking, where did you get this code from? Have you actually tried it and does it work?
      {{ DiscussionBoard.errors[8955410].message }}
      • Profile picture of the author r0dvan
        Originally Posted by Racingheart View Post

        Hi r0dvan, thanks for this! This code doesn't seem to come from the website Marx just posted. If you don't mind me asking, where did you get this code from? Have you actually tried it and does it work?
        Its a JSON decode using PHP.
        It allows to grab the JSON array from Facebook Graph.
        Also it will parse the parameters from the users id photos.
        Signature
        LeadGen.tools - Lead Generation Search Engine from any Network and many useful tools. FREE trial.
        {{ DiscussionBoard.errors[8955563].message }}
    • Hi R0dvan,

      Thanks for this. I think a lot of us and many others will greatly appreciate if you could have this PHP script with the HTML form code (for entering Facebook page name or URL) tested and posted for download (at a reasonable price if you want), so we can test this in our own servers? It says "Request a custom freebie" in your sig, and I'd greatly appreciate it if you could treat this as my request, freebie or a reasonably priced one...
      Signature
      • Deep Learning & Machine Vision Engineer: ARIA Research (Sydney, AU)
      • Founder: Grayscale (Manila, PH) & SEO Campaign Manager: Kiteworks, Inc. (SF, US)
      {{ DiscussionBoard.errors[8955461].message }}
      • Profile picture of the author r0dvan
        Originally Posted by Marx Vergel Melencio View Post

        Hi R0dvan,

        Thanks for this. I think a lot of us and many others will greatly appreciate if you could have this PHP script with the HTML form code (for entering Facebook page name or URL) tested and posted for download (at a reasonable price if you want), so we can test this in our own servers? It says "Request a custom freebie" in your sig, and I'd greatly appreciate it if you could treat this as my request, freebie or a reasonably priced one...

        Sure, let me finish a load of work and I will code this as a freebie.
        But it only allows you to scrape a little more than 100 ids.
        Is that ok?
        Signature
        LeadGen.tools - Lead Generation Search Engine from any Network and many useful tools. FREE trial.
        {{ DiscussionBoard.errors[8955557].message }}
        • Originally Posted by r0dvan View Post

          Sure, let me finish a load of work and I will code this as a freebie.
          Cool! Thanks man!

          Originally Posted by r0dvan View Post

          But it only allows you to scrape a little more than 100 ids.
          Is that ok?
          No problem. I'll also take a look as well as consult my colleagues for any possible workaround, if any, so I' could update the script and post it here if there'd be a suitable workaround. I'll keep posted for the script -- Thanks again!
          Signature
          • Deep Learning & Machine Vision Engineer: ARIA Research (Sydney, AU)
          • Founder: Grayscale (Manila, PH) & SEO Campaign Manager: Kiteworks, Inc. (SF, US)
          {{ DiscussionBoard.errors[8955636].message }}
      • Profile picture of the author Racingheart
        Originally Posted by Marx Vergel Melencio View Post

        Hi R0dvan,

        Thanks for this. I think a lot of us and many others will greatly appreciate if you could have this PHP script with the HTML form code (for entering Facebook page name or URL) tested and posted for download (at a reasonable price if you want), so we can test this in our own servers? It says "Request a custom freebie" in your sig, and I'd greatly appreciate it if you could treat this as my request, freebie or a reasonably priced one...
        Thank you Marx for requesting this because I was just about to ask Rodvan that as well.
        Originally Posted by r0dvan View Post

        Sure, let me finish a load of work and I will code this as a freebie.
        But it only allows you to scrape a little more than 100 ids.
        Is that ok?
        Rodvan, is 100 ids the most you can scrape? Because my page has close to 200k likes and I need to scrape ALL of them. Is there a way to do it? I'm more than willing to pay you a fee if you can figure out how to scrape all these likes. 100 ids is of not much use to me cause I need to know all 200k ids. I know there is a software which can do this but they have a limit of up to 100 ids as well.
        Originally Posted by r0dvan View Post

        Its a JSON decode using PHP.
        It allows to grab the JSON array from Facebook Graph.
        Also it will parse the parameters from the users id photos.
        Do I need a compiler to try this out? Sorry if I sound stupid but I have not much experience in JSON decoding.
        Originally Posted by Marx Vergel Melencio View Post

        Cool! Thanks man!



        No problem. I'll also take a look as well as consult my colleagues for any possible workaround, if any, so I' could update the script and post it here if there'd be a suitable workaround. I'll keep posted for the script -- Thanks again!
        Will be over the moon if you can actually figure out how to scrape all the likes instead of just 100 likes ids. Thanks Marx! Speak to you on Skype tonight.
        {{ DiscussionBoard.errors[8956659].message }}
    • Profile picture of the author wkp63
      You are awesome!

      Originally Posted by r0dvan View Post

      Try this code.. it might get some.
      Sorry if this post should be on developer section, but it has to do with your topic.
      {{ DiscussionBoard.errors[8999145].message }}
    • Profile picture of the author Hassan Zobeen
      Originally Posted by r0dvan View Post

      Try this code.. it might get some.
      Sorry if this post should be on developer section, but it has to do with your topic.
      Code is nice but need some help how to implement it can you pm mai the how it will work for the page id
      Signature
      █ Superior Internet Marketing & Design Services
      █ Organize, Optimize, Maximize
      OutSeller | Search Engine Optimization | Custom Logo Design Service
      {{ DiscussionBoard.errors[9181966].message }}
  • Profile picture of the author nimrod123xadag
    I remember a time when this used to be possible. But today, with all the privacy concerns and issues, I don't think we can still do this anymore.
    Signature
    Google Makes Money From Other People's Content.
    --> Here's How You Can Do The Same <--

    {{ DiscussionBoard.errors[8956954].message }}
  • Profile picture of the author Racingheart
    I finally made a breakthrough on this Facebook Page likes extract! Thank you to everyone who responded to me!
    {{ DiscussionBoard.errors[8992719].message }}
    • Profile picture of the author p4laddi
      Just been reading this whole post with great interest including the links to other sites and very interested if you got this to work. Are you able to share with us?

      Originally Posted by Racingheart View Post

      I finally made a breakthrough on this Facebook Page likes extract! Thank you to everyone who responded to me!
      {{ DiscussionBoard.errors[8993418].message }}
      • Profile picture of the author Racingheart
        Originally Posted by p4laddi View Post

        Just been reading this whole post with great interest including the links to other sites and very interested if you got this to work. Are you able to share with us?
        Yeah I managed to get it to work but I won't say it's perfect yet. There are still a few minor technical issues I am trying to work on to make it perfect. Are you looking for something which can extract ALL likes ID from a page?
        {{ DiscussionBoard.errors[8994755].message }}
    • Profile picture of the author infimis
      Originally Posted by Racingheart View Post

      I finally made a breakthrough on this Facebook Page likes extract! Thank you to everyone who responded to me!
      Hey this is awesome, how many were you able to extract successfully? :confused:
      {{ DiscussionBoard.errors[8996524].message }}
  • Profile picture of the author hackvn9x
    [DELETED]
    {{ DiscussionBoard.errors[8998929].message }}
    • Profile picture of the author Racingheart
      Originally Posted by hackvn9x View Post

      Just pm, pls check your inbox
      Can't reply to your PM as I don't have the required post count to post on your wall so anyway, thanks for trying to help me out. I subscribed to your mailing list and I received a VCF file in my email. I downloaded it but all I get is just your name-card. There isn't any program for me to download to use. I watched your video and it seems like your program is pretty similar to what I've created as well. Are you sure you can scrape ALL facebook likes? Say for example if my page has 200,000 likes, are you sure you can actually scrape all 200,000 likes?

      Edit: Okay I just received a link to download your program. Apparantely I need to confirm my subscription. I will try it out and get back to you. However, I am still doubtful it can scrape ALL likes.
      {{ DiscussionBoard.errors[8998995].message }}
  • Profile picture of the author x1core
    i need some help too please.
    {{ DiscussionBoard.errors[9264754].message }}
  • Profile picture of the author joeeden
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[9422379].message }}
    • Profile picture of the author Racingheart
      [DELETED]
      {{ DiscussionBoard.errors[9436630].message }}
      • Profile picture of the author maxrainbow
        Originally Posted by Racingheart View Post

        I just checked out your website and this program looks very neat. Can you please explain how does this program work in details? For example, what language is this scraper developed in? Mine is developed in vb.net and from the way, I see it's pretty similar to yours but your seems more extensive because it also covers posts, groups and events whereas my scraper can only scrape from pages. I'm really interested in getting your program. Just wanna check with you if this scraper is a standalone program which is downloadable or is it something which has to be used on your website live? Because I am looking for a scraper which can be used without the access of your website which many of such websites are "forcing" us to access their websites to use their programs which is quite a hassle.
        Hi, "Facebook ID scraper" or "Social Lead Freak" wont help you with this task because they can't scrap page "likers", only page likes (From comments and post likes). What you need is a "graph search scraper" like AnyAudience Or Xtractor. You can use them by Searching for "People who like Some Page " or "People who like Some Page and leave in New York", then you can scrap this lists easily.

        Hope i could help
        {{ DiscussionBoard.errors[9440748].message }}

Trending Topics