Adding some description
Help for beginners who don't know where to start from
This commit is contained in:
25
README.rst
25
README.rst
@@ -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
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user