Skip to content

featherbear/facebook-messenger-puppeteer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Messenger Chat API via Puppeteer

Facebook's been getting real good at detecting and blocking accounts that are using (unofficial) user-account chat APIs, for example

It is likely that the reason why these libraries are being detected is because they do not send all the various polling information to Facebook. Some of these microanalytics are probably randomly generated each time too...

Whilst Facebook does have an official API, it is run on service accounts. Good for most cases, but not for all.

This project aims to create bindings to Messenger from a headless instance of Chrome using puppeteer, such that a fully fledged browser will do all of Facebook's microanalytic blunders

Installation

You can install the library through npm

npm install featherbear/facebook-messenger-puppeteer

Usage

const Client = require('facebook-messenger-puppeteer')
  • Client( {...opts} )
    • selfListen - bool - default: false
    • session - Array[CookieObj]
    • workerLimit - int - default: 3
  • .getSession()
  • .getCurrentUserID() - string
  • .login(email, password)
  • .sendMessage(target, data)
  • .listen(callback)
  • .listenRaw(callback)
  • .sendImage(target, imagePathOrImagePaths)

References