π Meet Messenger Flow: The Modern Node.js Library for Facebook Messenger Bots
Are you building Facebook Messenger bots and frustrated with outdated libraries?
I was in the same boat! BootBot was once the go-to library, but it hasn't kept up with Node.js updates and is no longer maintained. When I tried using BootBot with recent Node.js versions, I ran into compatibility issues and dead ends.
That's why I built Messenger Flow β a modern, actively maintained alternative that works out of the box with the latest Node.js versions. It's designed to be simple, flexible, and reliable, so you can focus on building great bots, not fighting with legacy code.
β¨ Why Messenger Flow?
- π’ Modern Node.js Support: Built for the latest Node.js versions.
- π§© Simple API: Inspired by BootBot, but improved for today's needs.
- π Active Maintenance: Regular updates and support for new Messenger features.
- π Clear Docs: Get started quickly with guides and examples.
π¦ Installation
Install Messenger Flow using npm:
npm install messenger-flow
π€ Quick Start: Your First Messenger Bot
Here's how to create a simple Messenger bot that replies "Hello, world!" to every message:
const MessengerFlow = require('messenger-flow');
const bot = new MessengerFlow({
accessToken: 'YOUR_PAGE_ACCESS_TOKEN',
verifyToken: 'YOUR_VERIFY_TOKEN',
appSecret: 'YOUR_APP_SECRET', // optional, for advanced use
webhook: '/webhook' // optional, default is '/webhook'
});
bot.on('message', (event, chat) => {
chat.say('Hello World!');
});
bot.start(3000); // Start server on port 3000
How it works:
- Initialize Messenger Flow with your Facebook app credentials.
- Listen for incoming messages with
bot.on('message', ...)
. - Reply using
chat.say()
. - Start your bot server with
bot.start()
.
Just replace the placeholders with your actual Facebook credentials, and you're ready to go!
π Learn More
Check out the Messenger Flow documentation for more features, guides, and advanced usage.
π¬ Let's Connect!
If you have questions, feedback, or want to share what you build, drop a comment below or open an issue on GitHub.
Happy bot building! π
Top comments (2)
Pretty cool to see someone actually fix this mess - old bot libraries broke on me too, respect for putting in the work.
Thanks