Download the PHP package lartisan/laravel-facebook-data-deletion without Composer

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

Laravel Facebook Data Deletion

[![Downloads](https://img.shields.io/packagist/dt/lartisan/laravel-facebook-data-deletion.svg?style=flat-square)](https://packagist.org/packages/lartisan/laravel-facebook-data-deletion/stats) [![Tests](https://img.shields.io/github/actions/workflow/status/lartisan/laravel-facebook-data-deletion/facebook-data-deletion-package-tests.yml?branch=main&style=flat-square&label=tests)](https://github.com/lartisan/laravel-facebook-data-deletion/actions) [![Latest Version on Packagist](https://img.shields.io/packagist/v/lartisan/laravel-facebook-data-deletion.svg?style=flat-square)](https://packagist.org/packages/lartisan/laravel-facebook-data-deletion) [![License](https://img.shields.io/packagist/l/lartisan/laravel-facebook-data-deletion.svg?style=flat-square)](https://github.com/lartisan/laravel-facebook-data-deletion/blob/main/LICENSE)

A Laravel package that automates Meta / Facebook Data Deletion Request callbacks through a secure webhook.

It validates and decodes the incoming signed_request, stores a deletion tracking record, dispatches the deletion workflow asynchronously, and exposes a public status page or JSON status endpoint for the confirmation code returned to Meta.

The package is intentionally generic. It does not assume a specific User model, a fixed Facebook ID column, or a hardcoded deletion strategy. Those details are provided by your application through resolver and deletion handler classes.

Table of Contents

Requirements

The package is designed to work with Laravel 11 and Laravel 12.

Installation

1. Install the package

2. Publish the configuration file

3. Run the migration

The package stores deletion tracking records in the facebook_data_deletion_requests table.

4. Optionally publish the status page view

Configuration

The package ships with config/facebook-data-deletion.php.

Environment variables

Add your Meta app secret to .env:

You may also optionally configure a dedicated queue connection or queue name:

Default configuration

After publishing the config, open config/facebook-data-deletion.php and point resolver and deletion_handler to the two classes you will create in the next steps:

How the config wires everything together

The package reads these two class names at runtime and binds them to their contracts via Laravel's service container. You never call these classes directly — they are automatically injected by the framework:

  • resolver → injected into the package's controller to look up the subject model from the Meta App-Scoped ID.
  • deletion_handler → injected into the ProcessFacebookDataDeletionRequest job to carry out the actual deletion or anonymization.

All you need to do is create the two classes described below and set their fully-qualified class names in this config file.

Configuring the User model and Facebook ID field

The package does not hardcode a user model or a facebook_id column. Instead, you configure a resolver class that knows how to map the Meta App-Scoped ID to the model you want to delete or anonymize.

Step 1 — Create the resolver class

Example: direct facebook_id column on users

Example: social_users.provider + social_users.provider_id

Step 2 — Register it in the config

Configuring the deletion strategy

Your application controls how data is deleted or anonymized by implementing the deletion handler contract.

Step 1 — Create the deletion handler class

Step 2 — Register it in the config

Usage

Once installed, the package registers the callback route by default at:

and the public status route at:

If you prefer a different route structure, update the route section in config/facebook-data-deletion.php.

What Meta sends

Meta submits a POST request containing a signed_request field.

The package:

Webhook Setup in Meta Dashboard

In the Meta App Dashboard, configure the Data Deletion Callback URL to point to your package route.

Step-by-step

  1. Open your Meta app.
  2. Go to App Dashboard.
  3. Open the Data Deletion Request or Data Deletion Callback section.
  4. Set the callback URL to your public HTTPS endpoint.
  5. Save the changes.

Example callback URL

Local testing with a tunnel

Meta cannot call a local .test domain directly. For local integration testing, expose your app through a public tunnel such as ngrok or cloudflared.

Example:

The Status Page

The URL returned to Meta includes a confirmation code and points to the status route.

Example:

By default:

Example JSON status response:

Testing

Generate a valid signed_request in Tinker / Tinkerwell

Use the following PHP snippet to generate a Meta-compatible signed_request for Postman, Insomnia, or cURL testing:

Test with cURL

Run the package test suite

From the package directory:

Postman / Insomnia Guide

1. Create a POST request

Use:

2. Set headers

3. Set the JSON body

4. Expected response

5. Check the status endpoint

Use the returned url directly in Postman, Insomnia, or a browser.

If you want JSON instead of HTML, send:

Security

The package validates the incoming Meta signature using HMAC-SHA256 before any deletion logic is executed.

Security notes:

By default the package uses the api middleware group, which is the recommended setup for webhook endpoints in Laravel applications.

If you move the route under web middleware, make sure to exclude it from CSRF protection.

Package Architecture

The package exposes two extension points:

This lets the host application decide:

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-facebook-data-deletion with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/queue Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/view Version ^11.0|^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 lartisan/laravel-facebook-data-deletion contains the following files

Loading the files please wait ...