2017 © Pedro Peláez
 

library facebook-messenger-platform

Easily communicate with the facebook messenger platform

image

madewithlove/facebook-messenger-platform

Easily communicate with the facebook messenger platform

  • Friday, April 15, 2016
  • by bramdevries
  • Repository
  • 2 Watchers
  • 3 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

madewithlove/

Build Status Latest Stable Version Total Downloads Scrutinizer Quality Score Code Coverage, (*1)

A set of helpers to communicate with the Facebook Messenger Platform, (*2)

Goals

Install

Via Composer, (*3)

``` bash $ composer require madewithlove/facebook-messenger-platform, (*4)


## Usage ### Creating a client This package assumes you have followed the [getting started](https://developers.facebook.com/docs/messenger-platform/quickstart) guide and have received an access token for the Facebook page. ```php use Madewithlove\FacebookMessengerPlatform\Api\HttpClient; use Madewithlove\FacebookMessengerPlatform\Api\Client; $httpClient = new HttpClient('your_access_token'); $client = new Client($httpClient);

Sending Messages

Text

$client->send()->message('recipient_id', 'hello world');

Image

$client->send()->image('recipient_id', 'http://url-to-image.com');

Generic Template

Takes the recipient ID and an array of elements. Refer to the documentation for what the elements can consist of., (*5)

$client->send()->generic('recipient_id', []);

Buttons Template

Takes the recipient ID, an array of buttons and a text. Refer to the documentation for what the elements can consist of., (*6)

$client->send()->buttons('recipient_id', []);

Receipt Template

Takes the recipient ID and an payload for the receipt. Refer to the documentation for what the receipt can consist of., (*7)

$client->send()->buttons('recipient_id', []);

TODO

  • [ ] Welcome message configuration
  • [ ] User Profile

Testing

bash $ composer test, (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

15/04 2016

dev-master

9999999-dev

Easily communicate with the facebook messenger platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Madewithlove

facebook messenger bots

15/04 2016

0.1.0

0.1.0.0

Easily communicate with the facebook messenger platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Madewithlove

facebook messenger bots