FB Messenger 消息模板

FB Messenger Message Template

如何在fb messenger平台实现这个模板?

好像衬衫的颜色和价格都是消息的副标题,但是一条消息只能有1个副标题。那么如何实现有两个字幕呢?

这是我当前的消息模板

"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"
              }              
            ]
          }
        ]
      }
    }
  }

您只能向 message 本身添加新行,不能向 titlesbuttons快速回复 对于前

    messageData = { 
                    recipient: {id: recipientId},
                    message: {
                     text: "Your First Line \n your second line",
                     metadata:"DEVELOPER_DEFINED_METADATA"
                   }};

只需添加新元素。

"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"
              }              
            ]
          }
        ]
      }
    }
  }