aamant/facebook-connect

Laravel Facade for Facebook PHP SDK

1.0.1 2014-02-11 08:00 UTC

This package is not auto-updated.

Last update: 2024-11-05 06:45:36 UTC


README

Laravel Facade for Facebook PHP SDK

Add aamant\facebook to composeer.json

"aamant/facebook-connect": "dev-master"

Add Provider to app/config/app.php

'providers' => array(
	'Aamant\FacebookConnect\FacebookConnectServiceProvider'
)

And Alias

'aliases' => array(
	'Fconnect'		  => 'Aamant\FacebookConnect\Facades\Fconnect',
)

Configuration

Run php artisan config:publish aamant/facebook-connect and modify the config file with your own informations.

Exemple

  1. Get Login Url with your credentials and scope.

    Route::get('facebook', function(){ if (0 === Fconnect::getUser()){ return Redirect::to(Fconnect::getLoginUrl()); } else { return Fconnect::api('/me'); } });