PHPackages                             roysegall/facebook-messenger-send-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. roysegall/facebook-messenger-send-api

ActiveLibrary[API Development](/categories/api)

roysegall/facebook-messenger-send-api
=====================================

Reflecting Facebook Messenger send API arrays payload to an OOP design pattern

0.0.2(9y ago)73095[2 issues](https://github.com/RoySegall/facebook-messenger-send-api/issues)1MITPHP

Since Jun 16Pushed 9y ago2 watchersCompare

[ Source](https://github.com/RoySegall/facebook-messenger-send-api)[ Packagist](https://packagist.org/packages/roysegall/facebook-messenger-send-api)[ RSS](/packages/roysegall-facebook-messenger-send-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

Facebook Messenger send API
---------------------------

[](#facebook-messenger-send-api)

You started to write your but there is a problem - how to send back messages? You heads to the [Messenger platform send API](https://developers.facebook.com/docs/messenger-platform/send-api-reference)and start to read the documentation.

As you progress with the reading, you'll understand that if you want to send a text or an image required from to create and array with some confusing structure. But, that is not your worst problem - if you want to send generic template you need to send an enormous and confusing array.

This is where this library come in hand. The `Facebook Messenger send API`contains an object for each type of section in the send api for the Messenger platform. Combine that with the autocomplete feature that exists in any modern IDE and you'll get an easy way to construct the array.

Sending will be easy as well since there is a dedicated API for that. Let's dive in!

What are the principles and how they can assist you
---------------------------------------------------

[](#what-are-the-principles-and-how-they-can-assist-you)

If you'll have a look in the send api documentation you can see a specific structure:

- Content types
    - Text
    - Audio
    - Image
    - ...
- Templates
    - Button
    - Generic
    - List
    - ...
- Buttons
- Quick replies
- Sender
- ..

And inside, there are more fields and object. Let's have a look on how to start the object:

```
