I was wondering if it was possible to query the following:
Basically looking to generate detailed marketing stats of users who like my facebook page, if possible. Any suggestions or alternatives welcome.
Thank you.
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:
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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With