-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pashutan Modaresi
committed
Feb 18, 2019
1 parent
a5e1453
commit 8fff5a2
Showing
15 changed files
with
308 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
This is an example to send rich media using FBotics: | ||
|
||
```python | ||
from fbotics.client import Client | ||
from fbotics.models.quick_reply import QuickReply | ||
|
||
client = Client(page_access_token=PAGE_ACCESS_TOKEN) | ||
|
||
|
||
qr1 = QuickReply( | ||
dict( | ||
content_type="text", | ||
title="Yes", | ||
payload="payload1", | ||
image_url="http://i64.tinypic.com/1hothh.png", | ||
) | ||
) | ||
qr2 = QuickReply( | ||
dict( | ||
content_type="text", | ||
title="No", | ||
payload="payload2", | ||
image_url="http://i63.tinypic.com/2pqpbth.png", | ||
) | ||
) | ||
|
||
response = client.send_image( | ||
recipient_id=RECIPIENT_ID, url="http://i63.tinypic.com/2zfprph.png", quick_replies=[qr1, qr2] | ||
) | ||
|
||
response = client.send_audio( | ||
recipient_id=recipient_id, url="http://www.pacdv.com/sounds/voices/mmm-1.wav", quick_replies=[qr1, qr2] | ||
) | ||
|
||
response = client.send_file( | ||
recipient_id=recipient_id, url="http://www.xmlpdf.com/manualfiles/hello-world.pdf", quick_replies=[qr1, qr2] | ||
) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.