Is it still possible to scrape data from public facebook pages?

Viewed 7158

I want to scrape comments from a public facebook page (news network) through the facebook graph api. However it says i need to create a app to do this.

After a bit of research I found out that facebook prohibits web scraping since the cambridge analytica scandal.

Is there still a legal way to scrape data from facebook? Does somebody here have experience he/she can share? Thank you in advance.

2 Answers

I dont know about the legality of scraping facebook, but you can use a library called facebook_scraper

for instance:

from facebook_scraper import get_posts

for post in get_posts(name_of_your_public_group, pages=10):
    print(post['text'],'\n')

Note: working only for public pages

Related