Added baseline for sphinx documentation and on2FACode
event
The docs are still very WIP, but they should be functional. Just execute `make html` in the docs folder, and you should be able to navigate to `/docs/_build/html` and view it in your browser
This commit is contained in:
25
examples/send.py
Normal file
25
examples/send.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
from fbchat import Client
|
||||
from fbchat.models import *
|
||||
|
||||
client = Client("<email>", "<password>")
|
||||
|
||||
# Change these to match your thread
|
||||
thread_id = '1234567890'
|
||||
thread_type = ThreadType.GROUP # Or ThreadType.USER
|
||||
|
||||
# This will send a message to the thread
|
||||
client.sendMessage('Hey there', thread_id=thread_id, thread_type=thread_type)
|
||||
|
||||
# This will send the default emoji
|
||||
client.sendEmoji(emoji=None, size=EmojiSize.LARGE, thread_id=thread_id, thread_type=thread_type)
|
||||
|
||||
# This will send the emoji `👍`
|
||||
client.sendEmoji(emoji='👍', size=EmojiSize.LARGE, thread_id=thread_id, thread_type=thread_type)
|
||||
|
||||
# This will send the image called `image.png`
|
||||
client.sendLocalImage('image.png', message='This is a local image', thread_id=thread_id, thread_type=thread_type)
|
||||
|
||||
# This will send the image at the url `https://example.com/image.png`
|
||||
client.sendRemoteImage('https://example.com/image.png', message='This is a remote image', thread_id=thread_id, thread_type=thread_type)
|
Reference in New Issue
Block a user