I am a part of a couple political facebook groups (all closed groups) and I've noticed some anecdotal truth to the "fake news" hysteria. But I want proof. The Graph API doesn't allow pulling post data from closed groups - so I was wondering if a solution is possible where the facebook group is scraped when a new post shows up and the link posted is retrieved..? I have experience with Selenium Webdriver(for node) - but am unaware of scraping possibilities with node.js.
Sorry I'm new to Hashnode so forgot to check back here. But No. Like I said. the Facebook API does not let you retrieve posts from a private fb group you are only a member of. I tried a scraper and it worked wonderfully. Surprisingly no ip ban or anything.
Why scrape when you have API to fetch all details.
Hi,
A year ago we faced a similar issue. We had to update our database (Firebase) as soon as a new post has been added to the specified group. And what we did - we came up with the Selenium web driver solution, which opens a browser, login to Facebook as a regular user, navigate to specified group and fetch last N post from there and save them to database. + we implemented scheduling, so we could tune how often the app should repeat next group post fetching iteration with further db updates
In such way, we achieved a most similar to a real-time solution. The delay was 1-5 min +/-
Some more info about this tool you may find here
Jack Carter
Technology Lover
Facebook has a appropriate API that you can use for assorted purposes. This API will as well accommodate you with simple admission to any contour data, with restrictions.
You acquire to accumulate in apperception that just scraping Facebook user profiles is actionable in several countries as it is advised a privacy invasion. The fines for this are calmly six figures or more, additional possible jail time if you abolished the collected data. So, use the Facebook API and accept those restrictions!
Also, Facebook keeps clue of all visits so if you write a Scraper outside their API, you would basically be accomplishing a lot of page requests, which will be flagged and can result in your access to Facebook getting revoked, your IP address being blocked plus a notification to the local police about suspicious hacking attempts. Don’t blend with Facebook!