A lightweight framework for building Facebook Messenger apps
$ npm install messen
Messen handles the boring stuff for you, and exposes a number of callback methods that you must define. These are:
getMfaCode
promptCredentials
onMessage
onThreadEvent
Have a look at the type definitions for how they should be implemented.
const messen = new Messen();
messen.onMessage = ev => {
console.log(ev);
};
// login to messen
messen.login({ email: 'test@mailnator.com', password: 'P4ssw0rd' }).then(() => {
// start listening to events, like messages, reactions, etc.
messen.listen();
});
- Messer - a CLI chat application for Facebook Messenger