fbchat - Facebook Messenger for Python
A powerful and efficient library to interact with Facebook’s Messenger, using just your email and password. This is an asyncio fork of the fbchat library.
This is not an official API, Facebook has that over here for chat bots. This library differs by using a normal Facebook account instead.
fbchat currently support:
Sending many types of messages, with files, stickers, mentions, etc.
Fetching all messages, threads and images in threads.
Searching for messages and threads.
Creating groups, setting the group emoji, changing nicknames, creating polls, etc.
Listening for, an reacting to messages and other events in real-time.
Type hints, and it has a modern codebase (e.g. only Python 3.5 and upwards).
async/await (COMING).
Essentially, everything you need to make an amazing Facebook bot!
Caveats
fbchat works by imitating what the browser does, and thereby tricking Facebook into thinking it’s accessing the website normally.
However, there’s a catch! Using this library may not comply with Facebook’s Terms Of Service!, so be responsible Facebook citizens! We are not responsible if your account gets banned!
Additionally, the APIs the library is calling is undocumented! In theory, this means that your code could break tomorrow, without the slightest warning! If this happens to you, please report it, so that we can fix it as soon as possible!
With that out of the way, you may go to Read The Docs to see the full documentation!
Installation
$ pip install fbchat-asyncio
If you don’t have pip, this guide can guide you through the process.
You can also install directly from source, provided you have pip>=19.0:
$ pip install git+https://github.com/tulir/fbchat-asyncio.git#egg=fbchat
Example Usage
import getpass
import fbchat
session = fbchat.Session.login("<email/phone number>", getpass.getpass())
user = fbchat.User(session=session, id=session.user_id)
user.send_text("Test message!")
More examples are available here.
Maintainer
Tulir Asokan / @tulir
Acknowledgements
This project was originally inspired by facebook-chat-api.
Metadata
Release files for fbchat-asyncio 0.6.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fbchat-asyncio-0.6.21.tar.gz | 55.4 kB | Without provenance | Details for fbchat-asyncio-0.6.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fbchat_asyncio-0.6.21-py3-none-any.whl | Python 3 | none | any | Details for fbchat_asyncio-0.6.21-py3-none-any.whl |
Total release size: 121.8 kB
Release files / fbchat-asyncio-0.6.21.tar.gz
| Download URL | fbchat-asyncio-0.6.21.tar.gz |
|---|---|
| Size | 55.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d1881a80814ee0ffb51f9e7fddc9826268432c04050c915ae905ed924317304
|
|
BLAKE2b-256 checksum How to use checksums |
1009e2ebacd51d9f7bbe0d218520d9d4f6596f38f6f2803a35e1e7139a4135a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6
|
Release files / fbchat_asyncio-0.6.21-py3-none-any.whl
| Download URL | fbchat_asyncio-0.6.21-py3-none-any.whl |
|---|---|
| Size | 66.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7b2a3082efcc75887dbba8561c662bbbd3152a4326299ab5b22badcb59535f3
|
|
BLAKE2b-256 checksum How to use checksums |
e540ce29c4364115f73b23955bf0d2291b679015095b18217e104412a8fa7330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6
|
Security for fbchat-asyncio 0.6.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.