我需要一些帮助......我正在开发一个Facebook messenger聊天机器人,我对List模板有疑问。当我发送模板时,收到响应并在网络上很好地显示,但在信使应用程序中,所有内容都集中在一个按钮上。任何想法将不胜感激。感谢。
if($message == "about"){
$answer = ["attachment"=>[
"type"=>"template",
"payload"=>[
"template_type"=>"list",
"elements"=>[
[
"title"=> "Founder",
"image_url"=> "https://www.cloudways.com/blog/wp-content/uploads/Migrating-Your-Symfony-Website.jpg",
"subtitle"=> "Frederick Angel",
"default_action"=> [
"type"=> "web_url",
"url"=> "https://www.cloudways.com/blog/migrate-symfony-from-cpanel-to-cloud-hosting/",
"webview_height_ratio"=> "tall",
// "messenger_extensions"=> true
// "fallback_url"=> "https://peterssendreceiveapp.ngrok.io/"
],
"buttons"=>[
[
"type"=>"postback",
"title"=>"Read about him",
"payload"=>"Frederick Angel",
"webview_height_ratio"=> "tall",
// "messenger_extensions"=>true
],
]
],
[
"title"=>"Concepts?",
"default_action"=> [
"type"=> "web_url",
"url"=> "https://www.cloudways.com/blog/migrate-symfony-from-cpanel-to-cloud-hosting/",
"webview_height_ratio"=> "tall",
// "messenger_extensions"=> true
// "fallback_url"=> "https://peterssendreceiveapp.ngrok.io/"
],
"buttons"=>[
[
"type"=>"postback",
"title"=>"Read about it",
"payload"=>"concepts",
"webview_height_ratio"=> "tall"
],
]
]
]
]];
$template = [
'recipient' => [ 'id' => $senderId ],
'message' => $answer
];
}