fbmessenger
A python library to communicate with the Facebook Messenger API's
What it is and what it does
fbmessenger is a wrapper around the Facebook Messenger Send API that lets you build chatbots and message handlers in Python. You extend a BaseMessenger class to handle incoming webhook events (messages, deliveries, reads, postbacks, etc.) and use a MessengerClient to send text, buttons, templates, and media attachments back to users. It includes support for message tags, notification types, and timeouts on network calls.
The package is designed to integrate with Flask or similar web frameworks to receive and process webhook callbacks from Facebook. It abstracts away the HTTP plumbing and JSON serialization, letting you focus on the logic of responding to user messages. However, the project has not been maintained since 2019, so it may not reflect current Facebook API requirements or Python ecosystem best practices.
Use it for:
- Build a simple chatbot that responds to user messages on Facebook Messenger with text or templated replies.
- Integrate Messenger into a Flask web app to handle incoming webhook events and send structured messages back.
- Send rich message templates (generic, button, receipt) with images, links, and interactive buttons to Messenger users.
- Upload and manage media attachments (images, audio, video, files) for use in Messenger conversations.
- Implement message tags to send notifications outside the standard 24-hour message window for specific use cases.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python library for sending and receiving messages through the Facebook Messenger API, with support for templates, attachments, buttons, and webhook handling.
No. The package is abandoned (last release April 2019, last commit December 2022) and has not been updated to reflect changes in the Facebook Messenger API or modern Python versions. Unless you are maintaining legacy code that already depends on it, you should use an actively maintained alternative or build directly against the current Facebook Graph API.
Install
fbmessenger on PyPI
pip
pip install fbmessengeruv
uv add fbmessengerpoetry
poetry add fbmessengerInstalling fbmessenger
Before you install
Installation is straightforward with low friction—a single wheel dependency on requests. However, the package is abandoned; the last commit was in 2022 and no releases have occurred since April 2019, raising concerns about compatibility with current Facebook API changes and Python versions.
License in practice
Licensed under Apache (permissive), so you may use, modify, and distribute the package freely in commercial and private projects without restriction.
Quickstart
pip install fbmessenger
from fbmessenger import BaseMessenger, MessengerClient
class Messenger(BaseMessenger):
def __init__(self, page_access_token):
self.client = MessengerClient(page_access_token)
def message(self, message):
self.send({'text': 'Received'}, 'RESPONSE')
def delivery(self, message): pass
def read(self, message): pass
def optin(self, message): pass
def postback(self, message): pass
def account_linking(self, message): pass
messenger = Messenger('your_page_token')
messenger.handle(webhook_payload)
Requires a Facebook app with Messenger product enabled, a page access token, and a publicly accessible webhook URL to receive callbacks from Facebook.
Verify before relying
- Whether the package remains compatible with current Facebook Messenger API endpoints and authentication requirements.
- Whether Python 3.3–3.5 support claims (in classifiers) reflect actual tested compatibility or are outdated.
- Whether the package handles recent Facebook API breaking changes introduced after April 2019.
Package facts
| License | Apache (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | abandoned — 2,669 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 280,412/month — #8,111 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fbmessenger-6.0.0-py2.py3-none-any.whl
Keywords: Facebook, Messenger, Bot, Chatbot
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
facebook-sdkA Python client library for the Facebook Graph…
permissive · top 15,000 on PyPI
slackwebSends messages to Slack channels via incoming…
permissive · top 15,000 on PyPI
onesignal-python-apiA Python client library for the OneSignal API…
unclear · top 15,000 on PyPI
azure-communication-emailSends emails via Azure Communication Services,…
permissive · top 5,000 on PyPI
discord-webhookSend messages to Discord channels via webhooks,…
permissive · top 5,000 on PyPI
telebotA Telegram bot library with route-based message…
permissive · top 15,000 on PyPI
pushbullet.pyA Python client library for the Pushbullet API…
permissive · top 15,000 on PyPI
python-oxmsgParses Outlook MSG files to extract email…
permissive · top 5,000 on PyPI
vonage-messagesProvides Python message models and client…
permissive · top 15,000 on PyPI