Chatbot Botman.io Facebook模板错误
我复制并粘贴了文档中的示例,顶部有一堆包含内容:Chatbot Botman.io Facebook模板错误,chatbot,facebook-chatbot,Chatbot,Facebook Chatbot,我复制并粘贴了文档中的示例,顶部有一堆包含内容: use Mpociot\BotMan\Facebook\GenericTemplate; use Mpociot\BotMan\Facebook\ListTemplate; use Mpociot\BotMan\Facebook\ButtonTemplate; use Mpociot\BotMan\Facebook\ElementButton; use Mpociot\BotMan\Facebook\Element; $botman->r
use Mpociot\BotMan\Facebook\GenericTemplate;
use Mpociot\BotMan\Facebook\ListTemplate;
use Mpociot\BotMan\Facebook\ButtonTemplate;
use Mpociot\BotMan\Facebook\ElementButton;
use Mpociot\BotMan\Facebook\Element;
$botman->reply(ButtonTemplate::create('Do you want to know more about BotMan?')
->addButton(ElementButton::create('Tell me more')->type('postback')->payload('tellmemore'))
->addButton(ElementButton::create('Show me the docs')->url('http://botman.io/'))
);
但它给了我一个错误:
[ErrorException]
Object of class Mpociot\BotMan\Facebook\ButtonTemplate could not be convert
ed to string
有线索吗?找到了原因;控制台驱动程序未处理Facebook模板;希望能在未来的版本中修复。不过,这在Facebook Messager上是有效的