pageboost / facebook-laravel
Facebook PHP SDK for Laravel 4.1
Requires
- php: >=5.3.0
- facebook/php-sdk: @stable
- illuminate/support: 4.1.*
This package is auto-updated.
Last update: 2021-02-15 14:36:31 UTC
README
Facebook PHP SDK wrapper package with Facebook Connect support through Laravel Session.
Most Facebook wrapper packages for Laravel just bootstrap the Facebook class from SDK which use PHP native session and cookies. Native PHP session is ok, but not usable in load balanced applications.
Moreover Laravel works only with encrypted cookies which increase application security. You can change your session provider to Redis, memcached or whatever and this will not break your Facebook Login integration!
Installation
Begin by installing this package through Composer.
{ "require": { "PageBoost/facebook-laravel": "dev-master" } }
Open app/config/app.php
and add following Service Provider and Facade
// Provider 'providers' => array( 'PageBoost\FacebookLaravel\FacebookServiceProvider', ) // Facade 'aliases' => array( 'FB' => 'PageBoost\FacebookLaravel\Facades\LaravelFacebook', )
Configuration
- Publish package configs
php artisan config:publish pageboost/facebook-laravel
- Customize
config.php
with your information
Setting details are.
appId
: Your facebook app id.secret
: Your facebook app secret.laravelDebug
: Indicates if api calls and internalBaseFacebook
errors should be logged inlaravel.log
allowSignedRequest
: Indicates if signed_request is allowed in query parameters.fileUpload
: Indicates if the CURL based @ syntax for file uploads is enabled.trustForwarded
: // Indicates if we trust HTTP_X_FORWARDED_* headers.
License
View the license for this repo.