2017-07-06 5 views
0

私はコピーして、ドキュメントからの例を貼り付け、の束は、上部に含まれていますBotman.io Facebookのテンプレートのエラー

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 

どれでも手掛かり?

答えて

0

原因を確認しました。コンソールドライバはFacebookテンプレートを処理していません。うまくいけば、将来のリリースで修正されます。 FacebookのMessagerでも動作します。

関連する問題