fbbotw.post_audio_attachment¶
-
fbbotw.
post_audio_attachment
(fbid, audio_url, is_reusable=False, messaging_type=’RESPONSE’, tag=None)[source]¶ Sends an audio attachment
Usage: >>> # Set the fbid of user you want to send the attachment >>> fbid = "<user page scoped id>" >>> # Set the url for the hosted audio >>> audio_url = "http://fbbotw.master/media/turdus.ogg" >>> # Send the audio >>> response = fbbotw.post_audio_attachment( fbid=fbid, audio_url=audio_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 audio.
- audio_url (str) – Url of a hosted audio (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: