Adding some description

Help for beginners who don't know where to start from
This commit is contained in:
Charliiee
2016-03-30 13:56:10 -03:00
parent 168f7c397b
commit 401a0ca82d

View File

@@ -28,6 +28,31 @@ Example
client = fbchat.Client("YOUR_ID", "YOUR_PASSWORD") 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 Authors
======= =======