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
array
call(string $url, array $data, string $type = self::TYPE_POST)
Request to API
HandleMessageResponse|array
sendMessage($message)
No description
sendThreadSetting(array $message, string $type = self::TYPE_POST)
Send thread_settings endpoint
array
sendUserApi($message)
Send user endpoint
debug($request, $response, $status)
No description
Details
at line 59
__construct(string $token)
FbBotApp constructor.
at line 68
setDebug($debug)
at line 83
protected array
call(string $url, array $data, string $type = self::TYPE_POST)
Request to API
at line 134
HandleMessageResponse|array
send(Message $message, string $type = self::TYPE_POST)
Send message to API
If instance of ThreadInterface, auto turn to thread_settings endpoint
at line 152
protected HandleMessageResponse
sendMessage($message)
at line 165
protected HandleMessageResponse
sendThreadSetting(array $message, string $type = self::TYPE_POST)
Send thread_settings endpoint
at line 177
protected array
sendUserApi($message)
Send user endpoint