为什么我的模板不发送Facebook Messenger Messenger?

时间:2019-07-08 18:01:30

标签: javascript templates facebook-messenger facebook-messenger-bot

我的问题是我想在Messenger机器人中发送模板,但我不发送模板

希望您能帮助我解决这个问题,我在这里找到的社区太好了

function showCerveza(senderId){
    const messageData = {
        "recipient": {
            "id": senderId
        },
        "message": {
            "attachment": {
                "type": "template",
                "payload": {
                    "template_type": "generic",
                    "elements": [
                        //Inicio de Tarjeta
                        {
                            "title": "Dos Equis",
                            "Subtitle": "Clasica y Ambar",
                            "image_url": "https://lideresmexicanos.com/wp-content/uploads/2018/08/DosEquis00.jpg",
                            //Boton que manda payload de la orden
                            "buttons": [
                                {
                                    "type": "postback",
                                    "title": "Elegir Dos Equis",
                                    "payload": "C2E_PAYLOAD",
                                }
                            ]
                        }
                    ]
                }
            }
        }
    };
    senderActions(senderId);
    callSendApi(messageData);
}

0 个答案:

没有答案