Fix various errors in examples
This commit is contained in:
@@ -3,7 +3,7 @@ import fbchat
|
|||||||
# Log the user in
|
# Log the user in
|
||||||
session = fbchat.Session.login("<email>", "<password>")
|
session = fbchat.Session.login("<email>", "<password>")
|
||||||
|
|
||||||
print("Own id: {}".format(sesion.user_id))
|
print("Own id: {}".format(session.user_id))
|
||||||
|
|
||||||
# Create helper User class
|
# Create helper User class
|
||||||
user = fbchat.Thread(session=session, id=session.user_id)
|
user = fbchat.Thread(session=session, id=session.user_id)
|
||||||
|
@@ -4,9 +4,9 @@ session = fbchat.Session.login("<email>", "<password>")
|
|||||||
|
|
||||||
client = fbchat.Client(session)
|
client = fbchat.Client(session)
|
||||||
|
|
||||||
thread = User(session=session, id=session.user_id)
|
thread = fbchat.User(session=session, id=session.user_id)
|
||||||
# thread = User(session=session, id="0987654321")
|
# thread = fbchat.User(session=session, id="0987654321")
|
||||||
# thread = Group(session=session, id="1234567890")
|
# thread = fbchat.Group(session=session, id="1234567890")
|
||||||
|
|
||||||
# Will send a message to the thread
|
# Will send a message to the thread
|
||||||
thread.send(fbchat.Message(text="<message>"))
|
thread.send(fbchat.Message(text="<message>"))
|
||||||
@@ -24,7 +24,7 @@ thread.send(fbchat.Message(sticker=fbchat.Sticker("767334476626295")))
|
|||||||
thread.send(
|
thread.send(
|
||||||
fbchat.Message(
|
fbchat.Message(
|
||||||
text="This is a @mention",
|
text="This is a @mention",
|
||||||
mentions=[fbchat.Mention(thread_id, offset=10, length=8)],
|
mentions=[fbchat.Mention(thread.id, offset=10, length=8)],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user