I am using Botman Studio to build a Facebook Messenger bot but I can't get the Generic template to show. It returns a blank message. I am following this docs - https://botman.io/2.0/driver-facebook-messenger and this is what I am doing. I don't know the problem might be
$discos = DB::select("select * from discos where status = 1");
foreach ($discos as $disco){
$res[] = array(
Element::create($disco->title)
->subtitle($disco->sub_title)
->image($disco->img_url)
->addButton(ElementButton::create('Pay')->payload($disco->slug)->type('postback'))
);
}
$bot->reply(GenericTemplate::create()
->addImageAspectRatio(GenericTemplate::RATIO_SQUARE)
->addElements($res)
);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire