Getting user data in Facebook Messenger

I experienced that most of the time, buttons not showing up are caused by errors in the template. I think maybe you forget to add some buttons to your elements: Generic template

In my case, an element looks like this and shows up on Messenger:

{
    "title": product["name"],
    "subtitle": "Product",  # workaround for cmdline button interpretation
    "image_url": product["imageUrl"],
    "buttons": [
        {
            "type": "postback",
            "title": "Add",
            "payload": '/user.selected_products',
        },
    ]
}
1 Like