gomoob / php-facebook-messenger
A PHP Library to easily work with the Facebook Messenger REST Web Services.
Installs: 3 651
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- php: ^5.6 || ^7.0
- guzzlehttp/guzzle: ^6.2.3
Requires (Dev)
- codeclimate/php-test-reporter: ^0.3.2
- pdepend/pdepend: ^2.2.4
- phpdocumentor/phpdocumentor: ^2.9.0
- phploc/phploc: ^3.0.1
- phpmd/phpmd: ^2.4.3
- phpunit/php-token-stream: >=1.4.2 <2.0.0
- phpunit/phpunit: ^5.5.4
- satooshi/php-coveralls: ^1.0.1
- sebastian/phpcpd: ^2.0.4
- squizlabs/php_codesniffer: ^3.0.1
- symfony/yaml: ^3.1.4
This package is not auto-updated.
Last update: 2024-11-10 04:48:17 UTC
README
A PHP Library to easily send Facebook Messenger message with the REST Web Services.
First sample, creating a Facebook Messenger text message
// Create a Facebook Messenger client $client = Client::create()->setPageAccessToken('XXXX-XXX'); // Create a request to send a simple Text Message $request = TextMessageRequest::create() ->setRecipient(Recipient::create()->setId('USER_ID')) ->setMessage(TextMessage::create()->setText('hello, world !')); // Call the REST Web Service $response = $client->sendMessage($textMessageRequest); // Check if its ok if($response->isOk()) { print 'Great, the message has been sent !'; } else { print 'Oups, the sent failed :-('; print 'Status code : ' . $response->getStatusCode(); print 'Status message : ' . $response->getStatusMessage(); }
Easy, isn't it ?
Documentation
In progress.
About Gomoob
At Gomoob we build high quality software with awesome Open Source frameworks everyday. Would you like to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible !
You can contact us by email at contact@gomoob.com or by phone number (+33) 6 85 12 81 26 or (+33) 6 28 35 04 49.
Visit also http://gomoob.github.io to discover more Open Source softwares we develop.