我正在测试Facebook Messenger平台的列表模板。
列表模板无法正常工作。请参考下面的代码(nodejs):
function sendInfoMessage(sender){
let messageData =
{
"attachment": {
"type": "template",
"payload": {
"template_type": "list",
"top_element_style": "large",
"elements": [{
"title": "Coffee & Chat",
"image_url": "https://ak3.picdn.net/shutterstock/videos/3567512/thumb/1.jpg",
"subtitle": "A place for students",
"buttons": [{
"title": "View",
"type": "web_url",
"url": "https://en.wikipedia.org/",
"webview_height_ratio": "tall"
}]
},
{
"title": "Classic White T-Shirt",
"image_url": "https://static.pexels.com/photos/20787/pexels-photo.jpg",
"subtitle": "100% Cotton, 200% Comfortable",
"buttons": [{
"title": "Shop Now",
"type": "web_url",
"url": "https://www.google.co.uk/",
"webview_height_ratio": "tall"
}]
}
]
}
}
}
sendRequest(sender, messageData)
}
结果:Chatbot回复了没有封面图片的普通列表。
任何人遇到这个问题并得到解决方案,请帮助我。