Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Querying Users who 'like' my Facebook Page

Tags:

I was wondering if it was possible to query the following:

  • List of (all) users who like my facebook page, and
  • Additional information those users have made publicly available (beyond first and last name)

Basically looking to generate detailed marketing stats of users who like my facebook page, if possible. Any suggestions or alternatives welcome.

Thank you.

like image 789
MrRay Avatar asked Mar 03 '11 16:03

MrRay


2 Answers

I am afraid this is NOT possible, follow this bug for more information.

Another proof is the page_fan table you will notice that only the uid field is indexable so you need to know the user id to search it and not the page_id, as you know if a user "likes" a page this would mean he is a "fan" of that page.


After being actively working with the Facebook API for a while now, and following the announcements and API releases (and deprecations) along with the introduction and changes of policies, I can understand that Facebook will only share info about their users by letting them explicitly do so (a.k.a interact/authorize your Apps).

And hence the best thing to do in the absence of such feature is:

  1. Understand your audience through Page Insights
  2. Collect fans interests & info by creating custom apps through Page Tabs and using other Facebook features like Questions
like image 145
ifaour Avatar answered Dec 01 '22 00:12

ifaour


Alright, nobody wants to break Facebook's TOS but they have tied our hands on our own basic data. So, scraping is illegal, but not saving a page. What I have done (and note that I needed this for offline purpose anyway): Go to https://www.facebook.com/browse/?type=page_fans&page_id={FAN PAGE ID} Scroll down until you have all of your fans. Save this page on your local machine, let's say, Facebook.html. Now, using ruby and nokogiri:

require 'nokogiri' >true f = File.open('/your_path/Facebook.html') doc = Nokogiri::HTML.parse(f.read) doc.xpath('//div[@class="fsl fwb fcb"]/a').each {|link| puts link.content} 
like image 27
Thiago Ganzarolli Avatar answered Dec 01 '22 00:12

Thiago Ganzarolli