From 5f2c318baf53f39eb31e9f13f51a767186878e99 Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Mon, 24 Sep 2018 21:04:21 +0200 Subject: [PATCH] Sending quick replies --- fbchat/client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fbchat/client.py b/fbchat/client.py index 69c858d..17587f9 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -1045,6 +1045,18 @@ class Client(object): if message.sticker: data['sticker_id'] = message.sticker.uid + if message.quick_replies: + xmd = {"quick_replies": []} + for quick_reply in message.quick_replies: + xmd["quick_replies"].append({ + "content_type": "text", + "title": quick_reply.title, + "payload": quick_reply.payload, + "image_url": quick_reply.image_url, + "data": quick_reply.data, + }) + data['platform_xmd'] = json.dumps(xmd) + return data def _doSendRequest(self, data, get_thread_id=False):