Błąd Botman.io Facebook Template

głosy
0

Mam skopiowane i wklejone na przykład z dokumentu, z bandą zawiera na górze:

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/'))
            );

ale on dał mi błąd:

  [ErrorException]
  Object of class Mpociot\BotMan\Facebook\ButtonTemplate could not be convert
  ed to string

Wszelkie trop?

Utwórz 06/07/2017 o 09:25
źródło użytkownik
W innych językach...                            


1 odpowiedzi

głosy
0

Znaleziono przyczynę; Sterownik konsoli nie jest obchodzenia się z Facebook szablon; Mam nadzieję, że będzie naprawić w przyszłej wersji. Działa to na Facebooku Messager chociaż.

Odpowiedział 07/07/2017 o 03:47
źródło użytkownik

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more