Download the PHP package asmaa-gamal/laravel-meta-messaging without Composer

On this page you can find all versions of the php package asmaa-gamal/laravel-meta-messaging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-meta-messaging

Laravel Meta Messaging

Tests Code quality Latest Version

Send Facebook Messenger and Instagram messages from Laravel — every message type, with a fluent API, pre-flight validation, and errors that actually tell you what went wrong.

Why this exists

Calling Meta's Send API is easy. Understanding why it failed is not.

Neither says what to do. The first means the recipient blocked you, deleted the chat, or restricts third-party apps — permanently, for that person. The second could be almost anything; most often it is a message tag Meta retired on 27 April 2026 without changing the error response, so code that worked for years now fails with an error that never mentions tags.

This package turns those into:

and refuses the retired tag before spending an API call, naming the tag, the date, and the replacement.

Installation

Publish the config if you want to edit it:

Add your credentials to .env:

Requires PHP 8.2+ and Laravel 12 or 13.

Laravel 11 is not supported. It has reached end of life with open security advisories, so Composer refuses to install any 11.x release — there is no version of it this package could target safely.

Quick start

Templates

Every Messenger template type, composed from immutable value objects:

Also available: ButtonTemplate, MediaTemplate, ReceiptTemplate, ProductTemplate, CustomerFeedbackTemplate. Buttons: UrlButton, PostbackButton, CallButton, LoginButton, LogoutButton, GamePlayButton. See docs/templates.md.

Quick replies

Choosing the Graph API version

Globally in config, per account, or per call:

Per account, in config/meta-messaging.php:

Then Meta::facebook('legacy'). A malformed version is rejected immediately with an explanation rather than becoming a confusing 404.

Multiple accounts and runtime tokens

Error handling

Two styles, same information.

Typed exceptions (default):

Structured results (never throws):

Access tokens are stripped from error context before it reaches your logs.

Every exception carries key(), hint(), apiCode(), subcode(), traceId(), channel(), endpoint(), isRetryable(), context(), and toArray().

See docs/errors.md for the full error reference.

Caught before the network

These never cost you an API call or a rate-limit slot:

Refused locally Instead of Meta's
A retired message tag (#100) Invalid parameter
A receipt template sent to Instagram (#100) Invalid parameter
Text past the channel limit (1,000 IG / 2,000 FB) (#100) Invalid parameter
More than 10 cards, 3 buttons, or 13 quick replies (#100) Invalid parameter
A private reply carrying media silent delivery of text only
Any Instagram reaction but ❤ (#100) Invalid parameter
A missing or malformed credential An access token is required

Turn it off with META_VALIDATE=false if you ever need to.

Queueing

Validation still runs at the call site, so a malformed message fails immediately rather than on a worker. The job retries throttling and network faults with backoff, and fails permanent errors outright instead of burning attempts.

Events

MetaMessageFailed fires before any exception is thrown, so you can record delivery failures without wrapping every send in a try/catch.

Testing

Simulate failures with the real error mapping:

Channel differences

Messenger Instagram
Host graph.facebook.com graph.instagram.com or graph.facebook.com
Text limit 2,000 1,000
Templates generic, button, media, receipt, product, customer feedback generic, button, product
Reactions any emoji ❤ only
Comment reply /{comment-id}/comments /{comment-id}/replies
Reusable uploads yes no
Message tags, personas yes no

Anything a channel lacks is refused locally with a message naming the alternatives.

Documentation

Contributing

Bug reports and pull requests are welcome — see CONTRIBUTING.md. New Meta error codes are especially welcome; adding one is a single line in ErrorCatalog.

Contact

Built and maintained by Asmaa Gamal.

For bugs and feature requests, please open an issue rather than emailing — it keeps the answer where the next person will find it. Email and LinkedIn are best for consulting enquiries or anything you would rather not discuss in public.

License

MIT. See LICENSE.md.


All versions of laravel-meta-messaging with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asmaa-gamal/laravel-meta-messaging contains the following files

Loading the files please wait ...