NAME
Facebook::Messenger::Client - Messenger Send API
SYNOPSIS
my
$client
= Facebook::Messenger::Client->new(
access_token
=>
'blabla'
);
$client
->send_text( 0123456789,
'Some message...'
);
my
$hashref
=
$client
->get_user( 01234567890 );
DESCRIPTION
If you want to build a Facebook chatbot you will need to use the Send API to send back messages to a recipient. This is a basic implementation of the Messenger Send API that allows (for the moment) to send text messages.
ATTRIBUTES
access_token
The access token provided by Facebook. This can also be set via the GRAPH_ACCESS_TOKEN environment variable.
METHODS
send
my
$hashref
=
$client
->
send
(
$recipient_id
,
$model
);
Generic send function. This will that a Facebook::Messenger::Client::Model instance and send it to the server.
send_text
my
$hashref
=
$client
->send_text(
$recipient_id
,
'The message goes here ...'
);
get_user
$hashref
=
$client
->get_user(
$user_id
);
AUTHOR
Tudor Marghidanu <tudor@marghidanu.com>
SEE ALSO
LICENSE
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.