Download the PHP package marshmallow/laravel-facebook-webhook without Composer
On this page you can find all versions of the php package marshmallow/laravel-facebook-webhook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marshmallow/laravel-facebook-webhook
More information about marshmallow/laravel-facebook-webhook
Files in marshmallow/laravel-facebook-webhook
Package laravel-facebook-webhook
Short Description A package to retrieve Facebook Leads with webhooks & Graph API in Laravel.
License MIT
Homepage https://github.com/marshmallow/laravel-facebook-webhook
Informations about the package laravel-facebook-webhook
Facebook Lead Webhook for Laravel
Installation
You can install the package via composer:
This package uses spatie/laravel-webhook-client & Laravel Socialite Please read the instructions from both packages!
Publish the migrations from spatie/laravel-webhook-client To create the table that holds the webhook calls, you must publish the migration with:
Make sure to add the correct config for the Spatie Webhook Package:
Please see the Base Installation Guide, then follow the provider specific instructions below.
Add configuration to config/services.php
You can publish the config & migration files with:
After the migration has been published, you can create the webhook_calls
table by running the migrations:
Make sure to have the following .env variables setup:
Config
This is the contents of the file that will be published at config/facebook-webhook.php
:
Setup
Create an Facebook app using the following instructions from Facebook, make sure your app has the following permissions: A Page or User access token requested by a person who can advertise on the ad account and on the Page
- The ads_management permission
- The leads_retrieval permission
- The pages_show_list permission
- The pages_read_engagement permission
- The pages_manage_ads permission
After setting up the migrations and the .env, run:
Usage
This package uses spatie/laravel-webhook-client to retrieve and process the incoming Facebook Webhook. For initial Facebook authentication it uses Laravel Socialite.
On an incoming webhook, it retrieves the Lead data through the Facebook Graph API and sends an event on completion.
You can specify which job should process the Lead data in the process_facebook_webhook_job
in the facebook-webhook
config file.
For example make a Job:
And add it to the config:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Marshmallow
- Spatie
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-facebook-webhook with dependencies
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
laravel/socialite Version ^v5.5.1
socialiteproviders/facebook Version ^4.1.0
spatie/laravel-package-tools Version ^1.9.2
spatie/laravel-webhook-client Version ^3.1.0