Skip to content

Sending interactive button (list)

Filippo Romani edited this page Sep 13, 2024 · 2 revisions

Note: row button title may not exceed 20 characters otherwise your message will not be sent to the target phone.

This functions sends a button to toggle a list select element. Reference: Facebook API

>>> messenger.send_button(
        recipient_id="255757xxxxxx",
        button={
            "header": "Header Testing",
            "body": "Body Testing",
            "footer": "Footer Testing",
            "action": {
                "button": "Button Testing",
                "sections": [
                    {
                        "title": "iBank",
                        "rows": [
                            {"id": "row 1", "title": "Send Money", "description": ""},
                            {
                                "id": "row 2",
                                "title": "Withdraw money",
                                "description": "",
                            },
                        ],
                    }
                ],
            },
        },
        sender=0,
    )
Clone this wiki locally