Bot
class Bot (View source)
Class Bot
Constants
TYPE_GET |
Request type GET |
TYPE_POST |
Request type POST |
TYPE_DELETE |
Request type DELETE |
Properties
protected string | $apiUrl | FB Messenger API Url | |
protected null|string | $token |
Methods
__construct(string $token)
FbBotApp constructor.
setDebug($debug)
No description
$this
setSecret($secret)
No description
array
call(string $url, array $data, string $type = self::TYPE_POST)
Request to API
HandleMessageResponse|array
sendMessage($message)
No description
sendProfile(array $message, string $type = self::TYPE_POST)
Send messenger profile endpoint
array
sendUserApi($message)
Send user endpoint
debug($request, $response, $status)
No description
Details
at line 65
__construct(string $token)
FbBotApp constructor.
at line 74
setDebug($debug)
at line 83
$this
setSecret($secret)
at line 100
protected array
call(string $url, array $data, string $type = self::TYPE_POST)
Request to API
at line 155
HandleMessageResponse|array
send(Message $message, string $type = self::TYPE_POST)
Send message to API
If instance of ProfileInterface, auto turn to thread_settings endpoint
at line 177
protected HandleMessageResponse
sendMessage($message)
at line 191
protected HandleMessageResponse
sendProfile(array $message, string $type = self::TYPE_POST)
Send messenger profile endpoint
at line 203
protected array
sendUserApi($message)
Send user endpoint