fbbotw.post_reusable_attachment

fbbotw.post_reusable_attachment(fbid, attachment_id, file_type, messaging_type=’RESPONSE’, tag=None)[source]

Sends a reusable attachment based on the attachment id to the specified user.

Usage:
>>> # Set the fbid of user you want to send the attachment
>>> fbid = "<user page scoped id>"
>>> # Retrive the attachment_id
>>> attachment_id = "<reusable attachment id>"
>>> # Call the function to send the attachment to the user
>>> response = fbbotw.post_reusable_attachment(
        fbid=fbid,
        attachment_id=attachment_id,
        file_type="video"
    )
Parameters:
  • fbid (str) – User id to send the attachment.
  • attachment_id (str) – Id of file you got when sent the attachment with the is_reusable flag as True or uploaded it using fbbotw.upload_reusable_attachment.
  • file_type (str) – ‘image’/’audio’/’video’/’file’.
  • 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:

Response object

Facebook docs:

/send-api-reference#attachment_reuse