New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

socialh4ck/facebook

Facebook PHP SDK Package for Laravel 4
208

Larablocks Analysis

socialh4ck/facebook works with Laravel 4 (latest release 1.0, Jul 10, 2014), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 4, past end of life
  • No release in the last 12 months (last: Jul 10, 2014)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jul 10, 2014.
  • No releases in the last 12 months.
  • First released: Jul 10, 2014.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require socialh4ck/facebook
Latest Version:1.0
PHP:>=5.3.0
Laravel:4
Last Updated:Oct 29, 2014
Links: GitHub  ·  Packagist
Maintainer: EliuFlorez

Facebook

Facebook PHP SDK for Laravel

Add socialh4ck/facebook to composer.json.

"socialh4ck/facebook": "dev-master"

Run composer update to pull down the latest version of Facebook.

Now open up app/config/app.php and add the service provider to your providers array.

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

Now add the alias.

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

Configuration

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

  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.

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

  2. Get User Id

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

  3. Use facebook API

    Route::get('/', function() { $profile = Facebook::api('/me?fields=id,name'); });

  4. Get Logout Url

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

  5. FQL

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

Related Packages

mcstutterfish/fbia-rss

Facebook Instant Articles RSS Builder (with Laravel 4 Service Provider)

290 2
xmhafiz/fb-page-feed

Simple wrapper class to get any Facebook Page posts

153,294 66
wehnhew/ucenter

Larave4 ucenter

148 12
atomita/normalization-request-uri

Normalization RequestUri for Laravel 4

22 0
ianfunghk/luckfbconnect

Facebook Connect for Laravel

17 0

Version History

Version Released PHP Laravel License
1.0 >=5.3.0 ~4.1