Facebook Messenger Chat API using Puppeteer

Posted

For some reason I have this had fascination of writing a bot for every messaging service I use.

i.e.


Perhaps about a year ago, Facebook’s bot detection algorithm really shone, and unfortunately the communication libraries (1) (2) (3) that I used were being blocked.
Consequently I stopped using my bot for various amusements.

Fast-forward to today, with COVID-19 doing its thing, I thought to revive my bot.
However, looking at the libraries - they all still seem to be blocked by Facebook.

The main reason why I believe these libraries are being blocked, is because they do not send all of the analytic data that a Messenger client usually would. Facebook probably tracks the lack of data being received, and throws a tantrum followed by a ban hammer.

So I decided to venture off and write my own API - facebook-messenger-puppeteer.

Unlike the other libraries, facebook-messenger-puppeteer is a wrapper of the puppeteer automation library.

Yes, it’s slow.
Yes, it’s not performant.
But at least it will work :)

More posts

VPS 2FA Setup

A quick summary of how to set up 2FA on a new VPS.

Posted

Fixing My Network Tester

Use, Break, Fix, Repeat

Posted