- How do I install mortezamasumi/fb-message in a Laravel app?
- Install it with Composer using composer require mortezamasumi/fb-message, then publish any package config if the service provider does not auto-publish it. You will typically add your Facebook Page access token and other Messenger settings to config and environment variables. After that, resolve the package client or facade from the container and send a test message to a page you control.
- Which Laravel and PHP versions does fb-message support?
- Version 5.2.0 adds declared support for Laravel 13, and the package is presumed to target Laravel 10 through 13 on PHP 8.2 or newer. The release note does not show whether the illuminate/* constraint was widened or whether older Laravel versions were dropped, so check composer.json before upgrading. If the minor release narrowed support, treat that as breaking for Laravel 10 or 11 applications.
- What Facebook app setup is needed before sending Messenger messages?
- You need a Facebook app, a Page, and a Page access token with the pages_messaging permission. Anything beyond messaging your own pages generally requires Business Verification and app review by Meta. For inbound replies you also need a webhook endpoint with verification-token and signature handling. Budget time for Meta's review process, not just the Laravel install.
- Does fb-message verify X-Hub-Signature-256 on Facebook webhooks?
- The package is described as an outbound adapter for sending Messenger messages through the Graph API, so inbound webhook verification is likely left to your application. You should implement the verification-token challenge and validate X-Hub-Signature-256 against the raw request body before trusting any payload. Check the package source or README to confirm whether any webhook helpers are included.
- Which Graph API version does this package use, and can I change it?
- The Graph API version is typically set in the package config, but you should confirm the pinned default in the published config file and in the source. The pinned Graph API version, not the Laravel version, is the most likely thing to break in production because Meta retires API versions on a fixed schedule. Make the version configurable in your own wrapper and plan to review it regularly.
- Can fb-message send attachments, buttons, and Messenger templates?
- The package is understood to include a fluent message builder covering text, attachments, buttons, and templates. Whether it covers every template shape you need depends on your payloads, so test your specific templates early. If a payload is not supported, you can usually fall back to sending a raw Graph API payload through the same client or Laravel's HTTP client.
- Should I send Messenger messages from a controller or a queued job?
- Send from a queued job or a Laravel notification rather than directly in a controller, because Graph API calls are external network requests that can be slow or rate-limited. If the package ships a notification channel it can plug into your existing notification pipeline; if it is facade-only, call it from a job. Either way, wrap it behind your own MessengerSender interface so the vendor package stays replaceable.
- How does fb-message handle Graph API errors such as expired tokens or rate limits?
- It is not confirmed from the release information whether Graph API error codes and subcodes, such as 190 for token expiry, 613 for rate limits, or 10 for policy violations, are mapped to typed exceptions. Inspect the client source and test the failure paths before relying on it in production. If errors come back as generic exceptions, catch and translate them in your own adapter.
- How do I test fb-message without calling the real Facebook Graph API?
- There is no confirmed built-in fake, so the safest approach is to define your own MessengerSender contract and a FakeMessenger test double that records messages instead of sending them. Bind the fake in the container during tests, and use Laravel's Http::fake for any direct HTTP assertions. This also keeps your tests independent of the package's internals.
- Is mortezamasumi/fb-message safe to use in production?
- It is a single-maintainer community package with no visible commercial backing or SLA, and reaching version 5.x implies several previous major releases. The integration itself is a thin outbound adapter, so the architectural risk is low if you wrap it behind your own interface. Pin the version, monitor Meta's Graph API deprecations, and have a plan to swap in a direct HTTP client if maintenance stops. Calling the Graph API directly with Laravel's HTTP client is a realistic fallback.