FB Messenger消息模板 [英] FB Messenger Message Template
本文介绍了FB Messenger消息模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在fb Messenger平台中实现此模板?
How can I achieve this template in fb messenger platform?
看来衬衫的颜色和价格都是消息的字幕,但是消息中只能有1个字幕.那么如何实现两个字幕呢?
It seems that the color of the shirt and the price are both subtitles of the message but there can only be 1 subtitle in a message. So how can achieve where there are two subtitles?
这是我当前的邮件模板
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"generic",
"elements":[
{
"title":"Classic T-Shirt",
"image_url":"http://petersapparel.parseapp.com/img/item100-thumb.png",
"subtitle":"Medium Grey %0D%0A s",
"buttons":[
{
"type":"web_url",
"url":"https://petersapparel.parseapp.com/view_item?item_id=100",
"title":"View details"
},
{
"type":"postback",
"title":"Buy Now!",
"payload":"USER_DEFINED_PAYLOAD"
}
]
}
]
}
}
}
推荐答案
您只能在消息本身中添加新行,而不能在标题或按钮中添加新行或快速回复 对于
You can only add new lines to the message itself, not to titles or buttons or quick replies for ex
messageData = {
recipient: {id: recipientId},
message: {
text: "Your First Line \n your second line",
metadata:"DEVELOPER_DEFINED_METADATA"
}};
这篇关于FB Messenger消息模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文