minimaxir / facebook-page-post-scraper

Data scraper for Facebook Pages, and also code accompanying the blog post How to Scrape Data From Facebook Page Posts for Statistical Analysis
2.12k stars 663 forks source link

Possibility to scrape Visitor Posts? #84

Open Katha17 opened 6 years ago

Katha17 commented 6 years ago

Hi,

I noticed, that when trying to get all posts from a company's Facebook Page, the page_post scraper only returns the posts made by the company itself. However, I would also like to download the posts and comments made by visitors to the page.

Does someone know how I can scrape these posts & comments as well?

vivek-quantiful commented 6 years ago

you can just change the node in the posts code from

node = "/{}/posts".format(page_id) to node = "/{}/visitor_posts".format(page_id)

eholderness95 commented 6 years ago

Vivek's answer will work, as will changing node = "/{}/posts".format(page_id) to node = "/{}/feed".format(page_id)

/feed returns everything on the page's feed, both posts made by visitors and by the page itself.