Botkit不发送通用模板(附件)facebook messenger

时间:2017-05-03 19:36:51

标签: facebook-messenger botkit

我正在尝试使用以下消息回复用户:

  bot.reply(message, {
                    "attachment":
                    {
                        "type": "template",
                        "payload": {
                            "template_type": "generic",
                            "sharable": true,
                            "elements": [
                                {
                                    "title": "MY title of bd",
                                    "image_url": "https://storage.googleapis.com/ssfkj.com/undefined",
                                    "subtitle": "undefined/undefinedundefinedn(undefined)",
                                    "default_action": { "type": "web_url", "url": "https://ssfkj.com/profile", "messenger_extensions": true, "webview_height_ratio": "tall", "fallback_url": "https://ssfkj.com/profile" }
                                    , "buttons": [{ "type": "payload", "payload": "DEL__PA_undefined", "title": "View more" }
                                    ]
                                }]
                        }
                    }
                });

但机器人什么也没发送。我的代码出了什么问题?

1 个答案:

答案 0 :(得分:2)

我的问题出现在这个层面上:

"buttons": [{ "type": "payload", "payload": "DEL__PA_undefined", "title": "View more" }]

  

输入属性

应该具有值

  

回发

不是

  

有效载荷