This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Charliiee 401a0ca82d Adding some description
Help for beginners who don't know where to start from
2016-03-30 13:56:10 -03:00
2016-01-11 09:04:32 +01:00
2015-04-18 21:55:56 +09:00
2015-04-18 21:55:56 +09:00
2015-04-18 21:55:56 +09:00
2016-03-30 13:56:10 -03:00
2015-12-26 12:57:20 -05:00

======
fbchat
======


Facebook Chat (`Messenger <https://www.messenger.com/>`__) for Python. This project was inspired by `facebook-chat-api <https://github.com/Schmavery/facebook-chat-api>`__.

**No XMPP or API key is needed**. Just use your ID and PASSWORD.


Installation
============

Simple:

.. code-block:: console

    $ pip install fbchat


Example
=======

.. code-block:: console

    import fbchat

    client = fbchat.Client("YOUR_ID", "YOUR_PASSWORD")


Sending a Message
=================

.. code-block:: python
    
    friends = client.getUsers("FRIEND'S NAME")  # return a list of names
    friend = friends[0]
    sent = client.send(friend.uid, "Your Message")
    if sent:
        print("Message sent successfully")


Getting last messages sent
==========================

.. code-block:: python
    
    last_messages = client.getThreadInfo(friend.uid,0)
    # messages come in reversed order
    last_messages.reverse()
    
    for message in last_messages:
        print(message.body)


Authors
=======

Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`__
Description
Fork - Facebook Chat (Messenger) for Python
Readme 3.5 MiB
Languages
Python 100%