fbbotw.post_file_attachment¶
-
fbbotw.
post_file_attachment
(fbid, file_url, is_reusable=False, messaging_type=’RESPONSE’, tag=None)[source]¶ Sends a file attachment
Usage: >>> # Set the fbid of user you want to send the attachment >>> fbid = "<user page scoped id>" >>> # Set the url for the hosted file >>> file_url = "http://fbbotw.master/media/fbbotw.pdf" >>> # Send the file >>> response = fbbotw.post_file_attachment( fbid=fbid, file_url=file_url ) >>> # If you want to make this attachment reusable, send >>> # a third parameter as is_reusable=True and the response >>> # object will have the attachment id to be used later.
Parameters: - fbid (str) – User id to send the file.
- file_url (str) – Url of a hosted file (10 Mb).
- is_reusable (bool) – Defines the attachment to be resusable, the response will have an attachment_id that can be used to re-send the attachment without need to upload it again. (You can use the post_reusable_attachment method to upload using the id).
- 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: