fbbotw.post_image_w_quickreplies¶
-
fbbotw.
post_image_w_quickreplies
(fbid, image_url, quick_replies, messaging_type=’RESPONSE’, tag=None)[source]¶ Sends an image with quick replies menu
Usage: >>> # Set the user id and the hosted image to send >>> fbid = "<user page scoped id>" >>> image_url = "http://i.imgur.com/uAUm3VW.jpg" >>> # Set the quick replies list to be sent >>> quick_replies = [ { "content_type": "text", "title": "I'm a dog person", "payload": "USER_DISLIKES" }, { "content_type": "text", "title": "This is a noice cat!", "payload": "USER_LIKES" } ] >>> # Send the image with the quick_replies >>> response = fbbotw.post_image_w_quickreplies( fbid=fbid, image_url=image_url, quick_replies=quick_replies )
Parameters: - fbid (str) – User id to send the quick replies menu.
- image_url (str) – image to be displayed with the quick-replies.
- quick_replies (list) –
(Max 11) format :
>>> quick_replies = [ { “content_type”: “text”, “title”: “Yes!”, “payload”: “USER_SAY_YES” }, { “content_type”: “text”, “title”: “Nope”, “payload”: “USER_SAY_NOT” }, { “content_type”: “location”, }, { “content_type”: “text”, “title”: “Red”, “payload”: “DEVELOPER_DEFINED_PAYLOAD_FOR_PICKING_RED”, “image_url”: “http://petersfantastichats.com/img/red.png” }, ] >>> # See all the fields for the quick reply object in the docs: >>> # /docs/messenger-platform/send-api-reference/quick-replies
- messaging_type (str) – Identifies the message type from: RESPONSE, UPDATE AND MESSAGE_TAG (Default: RESPONSE, if MESSAGE_TAG, tag param is required)
- tag (str) – Tag classifying the message, must be one of the following tags
Returns: Facebook docs: