Download the PHP package laravel-notification-channels/facebook without Composer

On this page you can find all versions of the php package laravel-notification-channels/facebook. 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 facebook

Facebook Notifications Channel for Laravel

Join PHP Chat Chat on Telegram Latest Version on Packagist Quality Score Total Downloads

This package makes it easy to send notifications using the Facebook Messenger with Laravel.

Contents

Installation

You can install the package via composer:

Setting up your Facebook Bot

Follow the Getting Started guide in order to create a Facebook Messenger app, a Facebook page and a page token, which is connecting both.

Next we need to add this token to our Laravel configurations. Create a new Facebook section inside config/services.php and place the page token there:

Usage

Let's take an invoice-paid-notification as an example. You can now use the Facebook channel in your via() method, inside the InvoicePaid class. The to($userId) method defines the Facebook user, you want to send the notification to.

Based on the details you add (text, attachments etc.) will determine automatically the type of message to be sent. For example if you only add text() then it will be a basic message; using attach() will turn this into a attachment message. Having buttons or cards will change this to the Button Template and Generic Template respectivily

The notification will be sent from your Facebook page, whose page token you have configured earlier. Here's a screenshot preview of the notification inside the chat window.

Laravel Facebook Notification Example

Message Examples

Basic Text Message

Send a basic text message to a user

Attachment Message

Send a file attachment to a user (Example is sending a pdf invoice)

Generic (Card Carousel) Message

Send a set of cards / items to a user displayed in a carousel (Example is sending a set of links). Note you can also add up to three buttons per card

Routing a message

You can either send the notification by providing with the page-scoped user id (PSID) of the recipient to the to($userId) method like shown in the above example or add a routeNotificationForFacebook() method in your notifiable model:

Available Message methods

Available Button methods

Available Card methods

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of facebook with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
guzzlehttp/guzzle Version ^6.2 || ^7.0
illuminate/notifications Version 5.5 - 9
illuminate/support Version 5.5 - 9
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 laravel-notification-channels/facebook contains the following files

Loading the files please wait ....