rehabstudio / fbmessenger

A python library to communicate with the Facebook Messenger API's
Other
115 stars 50 forks source link

Send Image with caption #62

Open ohld opened 5 years ago

ohld commented 5 years ago

Hi, there and thank you for your library!

Currently, there is no way to add text to an image. Can it be implemented in the future versions? Thanks

class Image(BaseAttachment):
    def __init__(self, url=None, is_reusable=None, quick_replies=None, attachment_id=None):
        self.attachment_type = 'image'
        self.url = url
        self.is_reusable = is_reusable
        self.quick_replies = quick_replies
        self.attachment_id = attachment_id
        super(Image, self).__init__(self.attachment_type, self.url, self.is_reusable,
                                    self.quick_replies, self.attachment_id)
noamkush commented 5 years ago

Facebook API doesn't allow sending an image with a caption. Maybe you're looking to use one of the templates?