PHPackages                             ahmedash95/laravel-facebook-poster-notification - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. ahmedash95/laravel-facebook-poster-notification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ahmedash95/laravel-facebook-poster-notification
===============================================

Laravel Notification for posting on Facebook

0.2(9y ago)015[1 issues](https://github.com/ahmedash95/laravel-facebook-poster-notification/issues)PHP

Since Nov 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ahmedash95/laravel-facebook-poster-notification)[ Packagist](https://packagist.org/packages/ahmedash95/laravel-facebook-poster-notification)[ RSS](/packages/ahmedash95-laravel-facebook-poster-notification/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

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

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

[![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://camo.githubusercontent.com/ee21837b75479e2a02827bf2d85d64fd5e41bb2acef7b6603b3899e6e7f24dae/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/facebook-poster)[![StyleCI](https://camo.githubusercontent.com/aac94c6ca2c2d8d8f70f205efb8e67bde9db5778882ad3eda185abd17f00f33f/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333336313533332f736869656c64)](https://styleci.io/repos/73361533)[![SensioLabsInsight](https://camo.githubusercontent.com/7a395d7551140767a9f38f838e0e96b367bae56234402374185cd65ee8d795a1/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f3a73656e73696f5f6c6162735f69642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/:sensio_labs_id)[![Quality Score](https://camo.githubusercontent.com/67e2849203f2d1cf4ce45a67ae772ba3e8fd2807060759677e9ba96fb03a5413/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/facebook-poster)[![Code Coverage](https://camo.githubusercontent.com/8e276dfff7d67f582eeec942b300c418a095e4523403f11e8fa292372f13b1e5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/facebook-poster/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/3b45cbf58d79cf3a4eff77ba8d794f819d2214b65ba1e11feec07380529ea0be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f66616365626f6f6b2d706f737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/facebook-poster)

This package makes it easly to post on facebook using FacebookPoster Notification with Laravel 5.3

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)
    - [Publish Facebook post with image](#publish-facebook-post-with-image)
    - [Publish Facebook post with video](#publish-facebook-post-with-video)
- [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
```

Next add the service provider to your `config/app.php`:

```
...
'providers' => [
	...
	 NotificationChannels\FacebookPoster\FacebookPosterServiceProvider::class,
],
...
```

### Setting up the Facebook Poster service

[](#setting-up-the-facebook-poster-service)

You will need to [create](https://developers.facebook.com/apps/) a Facebook app in order to use this channel. Within in this app you will find the `APP Id and APP Secret Key`. Place them inside your `.env` file. In order to load them, add this to your `config/services.php` file:

```
...
'facebook_poster' => [
	'app_id'    => getenv('FACEBOOK_APP_ID'),
	'app_secret' => getenv('FACEBOOK_APP_SECRET'),
	'access_token'    => getenv('FACEBOOK_ACCESS_TOKEN'),
]
...
```

This will load the Facebook app data from the `.env` file. Make sure to use the same keys you have used there like `FACEBOOK_APP_ID`.

To create a life time access token for your fan page, open the [Graph Api Explorer](https://developers.facebook.com/tools/explorer/) on the right body heading, select your app then click on the get token button and select **Get Page Access Token** then select your page, after this add access\_token parameter into the query string `me?fields=id,name,access_token` then submit and copy the access token value to your 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];
    }

    public function toFacebookPoster($notifiable) {
        return new FacebookPosterPost('Laravel notifications are awesome!');
    }
}
```

### Available methods

[](#available-methods)

Take a closer look at the `FacebookPosterPost` object. This is where the magic happens.

```
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 awesom!'))->withLink('https://laravel.com');
}
```

### Publish Facebook post with image

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

It is possible to publish image with your post too. You just have to pass the image path to the `withImage` method.

```
public function toFacebookPoster($notifiable) {
    return (new FacebookPosterPost('Laravel notifications are awesom!'))->withImage('tayee.png');
}
```

**Notice** : withImage accepts absolute url not system paths like `/home/user/downloads/image.png`

### Publish Facebook post with video

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

It is also possible to publish video with your post too. You just have to pass the video path to the `withVideo` method.

```
public function toFacebookPoster($notifiable) {
    return (new FacebookPosterPost('Laravel notifications are awesom!'))
    	->withVideo('bedaer.mp4',[ 'title' => 'My First Video' , 'Description' => 'published by FacebookPoster.' ]);
}
```

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

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

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3524d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8f7720b07ee7addde37df48b85d7de8e127f043d7c1b7aacd0af79328301f0d?d=identicon)[ahmedash95](/maintainers/ahmedash95)

---

Top Contributors

[![ahmedash95](https://avatars.githubusercontent.com/u/8272048?v=4)](https://github.com/ahmedash95 "ahmedash95 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahmedash95-laravel-facebook-poster-notification/health.svg)

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

###  Alternatives

[laravel-notification-channels/webpush

Web Push Notifications driver for Laravel.

9005.5M28](/packages/laravel-notification-channels-webpush)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2022.2M8](/packages/laravel-notification-channels-apn)[illuminate/mail

The Illuminate Mail package.

5910.6M503](/packages/illuminate-mail)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67628.6k1](/packages/laravel-notification-channels-expo)

PHPackages © 2026

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