aplr/laravel-facebook

Facebook SDK Bridge for Laravel

v0.1.4 2018-05-22 19:07 UTC

This package is auto-updated.

Last update: 2024-10-20 13:56:09 UTC


README

Travis Packagist license

Introduction

The laravel-facebook package allows you to use the Facebook-SDK in a more laravel-ish way.

Installation

Require the aplr/laravel-facebook package in your composer.json and update your dependencies:

$ composer require aplr/laravel-facebook

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Aplr\LaravelFacebook\ServiceProvider::class,

If you want to use the facade to conveniently access the Facebook SDK, add this to your facades in app.php:

'Facebook' => Aplr\LaravelFacebook\Facade::class,

Configuration

The defaults are set in config/facebook.php. Copy this file to your own config directory to modify the values. You can publish the config using this command:

$ php artisan vendor:publish --provider="Aplr\LaravelFacebook\ServiceProvider"

When using the default package configuration, you can set the Facebook SDK credentials in your .env file:

FACEBOOK_APP_ID=#YOUR APP ID#
FACEBOOK_APP_SECRET=#YOUR APP SECRET#
FACEBOOK_GRAPH_VERSION=v2.9

Licence

Laravel-Facebook is open-sourced software licensed under the MIT license.