2017-09-05 50 views
0

我正在寻找将多个响应返回给用户。例如,这可能是图像和文本块,或文本块和列表。Facebook Messenger僵尸程序,返回多条消息或有效负载

到目前为止,我还没有找到一种方法来做到这一点,我所尝试的任何一种结果都会导致其中一个有效载荷无法显示或者完全失败。

这里是在显示文本块列表的尝试的例子:

{ 
    speech:"myMessage", 
    displayText:"myMessage", 
    data:{ 
     facebook:{ 
      "attachment": { 
       "type": "template", 
       "payload": { 
       "template_type": "list", 
       "top_element_style": "compact", 
       "elements": [ 
        { 
        "title": "£10", 
        "image_url": "http://example.com/example.jpg", 
        "subtitle": "An amazing t-shirt" 
        }, 
        { 
        "title": "£30", 
        "image_url": "http://example.com/example.jpg", 
        "subtitle": "Another amazing t-shirt" 
        }, 
        { 
        "title": "£40", 
        "image_url": "http://example.com/example.jpg", 
        "subtitle": "An amazing t-shirt" 
        } 
       ] 
       } 
      } 
     } 
    }, 
    contextOut:[], 
    source:"webhook" 
} 

上我要去哪里不对任何想法?

回答