2017 © Pedro Peláez
 

library facebook

Facebook PHP SDK Package for Laravel 4

image

boparaiamrit/facebook

Facebook PHP SDK Package for Laravel 4

  • Friday, July 10, 2015
  • by boparaiamrit
  • Repository
  • 2 Watchers
  • 48 Stars
  • 9,830 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Facebook

Note

Please Get New Facebook Package https://github.com/SammyK/LaravelFacebookSdk, (*1)

Facebook PHP SDK for Laravel, (*2)

Add boparaiamrit/facebook to composer.json., (*3)

"boparaiamrit/facebook": "dev-master"

Run composer update to pull down the latest version of Facebook., (*4)

Now open up app/config/app.php and add the service provider to your providers array., (*5)

'providers' => array(
    'Boparaiamrit\Facebook\FacebookServiceProvider',
)

Now add the alias., (*6)

'aliases' => array(
    'Facebook' => 'Boparaiamrit\Facebook\FacebookFacade',
)

Configuration

Run php artisan config:publish boparaiamrit/facebook and modify the config file with your own informations., (*7)

  1. AppId => If you donot have appId then get it from facebook developer apps.
  2. Secret => Its come with appId.
  3. Redirect => Specify redirect url after logged in with facebook.
  4. Logout => When somebody logout from your site, it redirects to logout url.
  5. Scope => These are permission you want from your users.

Examples

  1. Get Login Url with your credentials and scope., (*8)

    Route::get('/', function() { return Facebook::loginUrl(); });, (*9)

  2. Get User Id, (*10)

    Route::get('/', function() { return Facebook::getUser(); });, (*11)

  3. Use facebook API, (*12)

    Route::get('/', function() { $profile = Facebook::api('/me?fields=id,name,first_name,last_name,username,email,gender,birthday,hometown,location,picture.width(100)'); });, (*13)

  4. Get Logout Url, (*14)

    Route::get('/', function() { return Facebook::logoutUrl(); });, (*15)

  5. FQL, (*16)

    Route::get('/', function() { return Facebook::api(array( 'method' => 'fql.query', 'query' => "SELECT uid, sex, username, birthday, education, work FROM user WHERE uid = me()", )); });, (*17)

The Versions

10/07 2015

dev-master

9999999-dev

Facebook PHP SDK Package for Laravel 4

  Sources   Download

The Requires

 

by Avatar boparaiamrit

laravel facebook laravel4

06/03 2014

dev-new

dev-new

Facebook PHP SDK Package for Laravel 4

  Sources   Download

The Requires

 

by Avatar boparaiamrit

laravel facebook laravel4