答案 0 :(得分:1)
使用botman Studio框架时,只需启用模板即可启用->扩展:
$question = GenericTemplate::create()
->addImageAspectRatio(GenericTemplate::RATIO_SQUARE);
foreach ($objects as $object) {
$question->addElements([
Element::create($object->code)
->image($object->arch)
->addButton(ElementButton::create("Information")->payload($object->code)->type("postback"))
->addButton(ElementButton::create('add to car')->url('')->enableExtensions('true'))
->addButton(ElementButton::create("back")->payload("back
> and add your domains to your whitelist from config / botman / facebook.php
")->type("postback"))
]);
}
并通过config / botman / facebook.php将您的域添加到白名单中:
'whitelisted_domains' => [
'https://',
'https://',
],
在您的Facebook页面上添加您的域,输入Messenger设置,whitelisted_domains即可,