如何在fb信使平台上实现此模板?

似乎衬衫的颜色和价格都是信息的字幕,但一条消息中只能有一个字幕。那么,怎样才能实现有两个字幕的地方呢?
这是我当前的信息
"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"
}
]
}
]
}
}
}发布于 2016-07-18 09:16:41
您只能将新行添加到消息本身,而不能添加到标题或按钮或快速回复中。
messageData = {
recipient: {id: recipientId},
message: {
text: "Your First Line \n your second line",
metadata:"DEVELOPER_DEFINED_METADATA"
}};发布于 2016-09-26 17:55:13
只需添加新元素。
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"generic",
"elements":[
{
"title":"Classic T-Shirt",
"image_url":"<link>",
"subtitle":"Medium Grey %0D%0A s",
"buttons":[
{
"type":"web_url",
"url":"<link>",
"title":"View details"
},
{
"type":"postback",
"title":"Buy Now!",
"payload":"USER_DEFINED_PAYLOAD"
}
]
},
{
"title":"Classic T-Shirt",
"image_url":"<link>",
"subtitle":"Medium Grey %0D%0A s",
"buttons":[
{
"type":"web_url",
"url":"<link>",
"title":"View details"
},
{
"type":"postback",
"title":"Buy Now!",
"payload":"USER_DEFINED_PAYLOAD"
}
]
}
]
}
}
}https://stackoverflow.com/questions/38429355
复制相似问题