PHPackages                             isaacongoma/facebook-poster - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. isaacongoma/facebook-poster

ActiveLibrary

isaacongoma/facebook-poster
===========================

Use notification to create posts on Facebook

5.0.0(5y ago)08MITPHPPHP ^7.3|^8.0

Since Nov 12Pushed 4y agoCompare

[ Source](https://github.com/isaacongoma/facebook-poster)[ Packagist](https://packagist.org/packages/isaacongoma/facebook-poster)[ RSS](/packages/isaacongoma-facebook-poster/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (12)Used By (0)

FacebookPoster Notification Channel For Laravel
===============================================

[](#facebookposter-notification-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4c6bf7016584494779eeb7c40df231a26e63d65cbabaa9554c49cccd09f988dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/facebook-poster)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://github.com/laravel-notification-channels/facebook-poster/workflows/test/badge.svg)](https://github.com/laravel-notification-channels/facebook-poster/workflows/test/badge.svg)[![StyleCI](https://camo.githubusercontent.com/aac94c6ca2c2d8d8f70f205efb8e67bde9db5778882ad3eda185abd17f00f33f/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333336313533332f736869656c64)](https://styleci.io/repos/73361533)[![Total Downloads](https://camo.githubusercontent.com/3b45cbf58d79cf3a4eff77ba8d794f819d2214b65ba1e11feec07380529ea0be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/facebook-poster)

This package makes it easy to post to Facebook using Laravel notification channels.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Setting up the Facebook posts service](#setting-up-the-facebook-poster-service)
- [Usage](#usage)
    - [Publish Facebook post](#publish-facebook-post)
    - [Publish Facebook post with link](#publish-facebook-post-with-link)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install this package via Composer:

```
composer require laravel-notification-channels/facebook-poster
```

### Configuration

[](#configuration)

You'll need to get the Facebook Page ID as well as a page access token with the `pages_read_engagement` and `pages_manage_post` permissions. You will need to go through App Review in order to use these permissions. Then, add the configuration to your `config/services.php` file:

```
...
'facebook_poster' => [
    'page_id' => env('FACEBOOK_PAGE_ID'),
    'access_token' => env('FACEBOOK_ACCESS_TOKEN'),
],
```

Usage
-----

[](#usage)

Follow Laravel's [documentation](https://laravel.com/docs/master/notifications) to add the channel to your Notification class.

### Publish Facebook post

[](#publish-facebook-post)

```
use NotificationChannels\FacebookPoster\FacebookPosterChannel;
use NotificationChannels\FacebookPoster\FacebookPosterPost;

class NewsWasPublished extends Notification
{

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [FacebookPosterChannel::class];
    }

    /**
     * Get the Facebook post representation of the notification.
     *
     * @param  mixed  $notifiable.
     * @return \NotificationChannels\FacebookPoster\FacebookPosterPost
     */
    public function toFacebookPoster($notifiable) {
        return new FacebookPosterPost('Laravel notifications are awesome!');
    }
}
```

### Publish Facebook post with link

[](#publish-facebook-post-with-link)

It is possible to publish link with your post too. You just have to pass the URL to the `withLink` method.

```
public function toFacebookPoster($notifiable) {
    return (new FacebookPosterPost('Laravel notifications are awesome!'))
        ->withLink('https://laravel.com');
}
```

### Publish Facebook post with custom configuration

[](#publish-facebook-post-with-custom-configuration)

You can implement `routeNotificationForFacebookPoster()` on your notifiable class in order to provide custom configuration.

```
public function routeNotificationForFacebookPoster(): array
{
    return [
        'page_id' => 'customPageId',
        'access_token' => 'customAccessToken',
    ];
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Ahmed Ashraf](https://github.com/ahmedash95)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 56% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Recently: every ~117 days

Total

11

Last Release

1949d ago

Major Versions

0.0.1 → 1.0.02017-05-12

1.6.0 → 2.0.02019-10-04

2.0.0 → 3.0.02020-03-03

3.0.0 → 4.0.02020-09-11

4.0.0 → 5.0.02021-01-09

PHP version history (4 changes)1.6.0PHP ^7.2

3.0.0PHP ^7.2.5

4.0.0PHP ^7.3

5.0.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ffe219fcd3d38abd6f400d8d7db0485761fb6c5f003548aa8bdbe9c6de2c253?d=identicon)[isaacongoma](/maintainers/isaacongoma)

---

Top Contributors

[![dwightwatson](https://avatars.githubusercontent.com/u/1100408?v=4)](https://github.com/dwightwatson "dwightwatson (61 commits)")[![ahmedash95](https://avatars.githubusercontent.com/u/8272048?v=4)](https://github.com/ahmedash95 "ahmedash95 (22 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (14 commits)")[![isaacongoma](https://avatars.githubusercontent.com/u/21239787?v=4)](https://github.com/isaacongoma "isaacongoma (5 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (2 commits)")[![lightwalkernet](https://avatars.githubusercontent.com/u/8131304?v=4)](https://github.com/lightwalkernet "lightwalkernet (2 commits)")[![moleculezz](https://avatars.githubusercontent.com/u/118499?v=4)](https://github.com/moleculezz "moleculezz (2 commits)")[![coroin](https://avatars.githubusercontent.com/u/7023957?v=4)](https://github.com/coroin "coroin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/isaacongoma-facebook-poster/health.svg)

```
[![Health](https://phpackages.com/badges/isaacongoma-facebook-poster/health.svg)](https://phpackages.com/packages/isaacongoma-facebook-poster)
```

###  Alternatives

[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
