PHPackages                             bootdesk/chat-sdk-adapter-messenger - 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. bootdesk/chat-sdk-adapter-messenger

ActiveLibrary[API Development](/categories/api)

bootdesk/chat-sdk-adapter-messenger
===================================

Facebook Messenger adapter for bootdesk/chat-sdk-core

0.4.44(2w ago)0168MITPHPPHP &gt;=8.2

Since Jun 4Pushed 1w agoCompare

[ Source](https://github.com/bootdesk/chat-sdk-adapter-messenger)[ Packagist](https://packagist.org/packages/bootdesk/chat-sdk-adapter-messenger)[ RSS](/packages/bootdesk-chat-sdk-adapter-messenger/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (38)Used By (0)

bootdesk/chat-sdk-adapter-messenger
===================================

[](#bootdeskchat-sdk-adapter-messenger)

Facebook Messenger adapter for the laravel-bootdesk multi-platform messaging framework.

Install
-------

[](#install)

```
composer require bootdesk/chat-sdk-adapter-messenger
```

Requires a PSR-18 HTTP client (`guzzlehttp/guzzle`, `symfony/http-client`, etc.) and a PSR-17 factory (`nyholm/psr7` bundled).

Configuration
-------------

[](#configuration)

VariableDescriptionExample`page_access_token`Facebook Page Access Token`EAAx...``http_client`PSR-18 HTTP client instance`new GuzzleHttp\Client``app_secret`Facebook App Secret`abc123...``verify_token`Webhook Verify Token`my-verify-token````
use BootDesk\ChatSDK\Messenger\MessengerAdapter;

$adapter = new MessengerAdapter(
    pageAccessToken: env('MESSENGER_PAGE_ACCESS_TOKEN'),
    httpClient: new \GuzzleHttp\Client,
    appSecret: env('MESSENGER_APP_SECRET'),
    verifyToken: env('MESSENGER_VERIFY_TOKEN'),
);
```

### Laravel

[](#laravel)

The `ChatServiceProvider` auto-binds `Psr\Http\Client\ClientInterface` to `GuzzleHttp\Client`. Add to `config/chat.php`:

```
'messenger' => [
    'page_access_token' => env('MESSENGER_PAGE_ACCESS_TOKEN'),
    'app_secret'        => env('MESSENGER_APP_SECRET'),
    'verify_token'      => env('MESSENGER_VERIFY_TOKEN'),
],
```

Quick Example
-------------

[](#quick-example)

```
// Send a message to a user
$adapter->postMessage('messenger:1234567890', 'Hello from laravel-bootdesk!');
```

Text Formatting
---------------

[](#text-formatting)

Messenger supports `*bold*`, `_italic_`, `~strikethrough~`, ``monospace``, and ` `code blocks` ` syntax. The SDK's `MessengerFormatConverter` automatically converts standard markdown (`**bold**`, `~~strike~~`) to Messenger format when sending, and converts Messenger syntax back to standard markdown when receiving.

Message Templates
-----------------

[](#message-templates)

Messenger supports rich message templates via `PostableMessage::template()` with `MessengerTemplate`:

```
use BootDesk\ChatSDK\Messenger\MessengerTemplate;

// Button template
$adapter->postMessage('messenger:1234567890', PostableMessage::template(
    MessengerTemplate::create('options')
        ->buttonTemplate('Choose an option', [
            ['type' => 'postback', 'title' => 'Yes', 'payload' => 'YES'],
            ['type' => 'postback', 'title' => 'No', 'payload' => 'NO'],
        ])
));

// Generic template (carousel)
$adapter->postMessage('messenger:1234567890', PostableMessage::template(
    MessengerTemplate::create('catalog')
        ->genericTemplate([
            [
                'title' => 'Product A',
                'subtitle' => 'Best seller',
                'image_url' => 'https://example.com/a.jpg',
                'default_action' => ['type' => 'web_url', 'url' => 'https://example.com/a'],
                'buttons' => [['type' => 'web_url', 'title' => 'Buy', 'url' => 'https://example.com/a/buy']],
            ],
        ])
));

// Media template
$adapter->postMessage('messenger:1234567890', PostableMessage::template(
    MessengerTemplate::create('intro')
        ->mediaTemplate('https://example.com/video.mp4', 'video', [
            'type' => 'web_url', 'title' => 'Learn More', 'url' => 'https://example.com',
        ])
));
```

### All Template Types

[](#all-template-types)

MethodTemplate Type`buttonTemplate(string $text, array $buttons)`Button — text with up to 3 buttons`genericTemplate(array $elements)`Generic — cards with title, subtitle, image, buttons`mediaTemplate(string $url, string $mediaType, ?array $button)`Media — image/video with optional button`receiptTemplate(recipientName, orderNumber, currency, ...)`Receipt — order confirmation`productTemplate(string $productId)`Product — catalog product card`couponTemplate(title, code, ...)`Coupon — promotional offer`customerFeedbackTemplate(title, businessAddress, ratingOptions, ...)`Customer Feedback — native surveyCards from the SDK `Card` class (title, sections, images, buttons) are automatically rendered as **button** or **generic** templates.

Thread ID Format
----------------

[](#thread-id-format)

FormatDescription`messenger:{senderId}`One thread per senderWebhook
-------

[](#webhook)

Facebook sends webhook events to your endpoint. Verify requests using HMAC signature verification with the app secret (`X-Hub-Signature-256` header).

Feature Matrix
--------------

[](#feature-matrix)

FeatureSupportedPost messages✓Edit messages✗Delete messages✓Reactions✓Slash commands✓Typing indicator✓Fetch messages✗Fetch thread info✗Fetch channel info✗Get user✗Open DM✗Stream✓Notes
-----

[](#notes)

Facebook Messenger Platform. Supports quick replies, persistent menu, and get started button. Rich templates available via `MessengerTemplate` (button, generic, media, receipt, product, coupon, customer feedback).

Documentationn
--------------

[](#documentationn)

Full API documentation:

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

37

Last Release

14d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3874705?v=4)[Vin](/maintainers/tryvin)[@tryvin](https://github.com/tryvin)

---

Top Contributors

[![tryvin](https://avatars.githubusercontent.com/u/3874705?v=4)](https://github.com/tryvin "tryvin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bootdesk-chat-sdk-adapter-messenger/health.svg)

```
[![Health](https://phpackages.com/badges/bootdesk-chat-sdk-adapter-messenger/health.svg)](https://phpackages.com/packages/bootdesk-chat-sdk-adapter-messenger)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60316.0M89](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
