2017 © Pedro Peláez
 

library facebooksdk

Easy way to use facebook SDK

image

bonbon1702/facebooksdk

Easy way to use facebook SDK

  • Thursday, December 4, 2014
  • by bonbon1702
  • Repository
  • 1 Watchers
  • 3 Stars
  • 91 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

FacebookSDK

Installation

  • In composer.json, add require: "bonbon1702/facebooksdk": "dev-master"
  • Run, (*1)

    Composer update
    
  • In app/config/app.php:, (*2)

    -Add providers, (*3)

    'bonbon1702\Facebook\FbServiceProvider',
    

    -Add aliases, (*4)

    'Fb' => 'bonbon1702\Facebook\Facades\Fb',
    
    • Publish the configuration:
    php artisan config:publish bonbon1702/facebooksdk
    
    • After that, you must config app_id and app_secret in
app/config/packages/bonbon1702/facebooksdk/config.php

```php return array( 'app_id' => '', 'app_secret' => '', 'redirect_url' => url('facebook/callback'), 'scope' => array( 'publish_actions', ) );, (*5)



Usage ------------ -Log in to Facebook

Fb::authenticate();, (*6)

-Check login(return boolean)

Fb::check(), (*7)

-Get user profile

Fb::getProfile()->asArray();, (*8)

-Get user profile picture

Fb::getUserProfilePicture($type)->asArray();($type is square,small,normal,large);, (*9)

-Publish posts to facebook 

Fb::postToTimeLine($message, $link);, (*10)




Example ------------ ```php Route::group(['prefix' => 'facebook'], function () { Route::get('connect', function () { return Fb::authenticate(); }); Route::get('callback', function () { $check = Fb::check(); if($check) { $profile = Fb::getProfile(); dd($profile); } }); });

The Versions

04/12 2014

dev-master

9999999-dev

Easy way to use facebook SDK

  Sources   Download

The Requires

 

by Nghiavt

laravel oauth facebook facebook-sdk-v4