Skip to content

rapliandras/laravel5-facebook-php-sdk-4-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Laravel 5 Facebook PHP SDK 4 wrapper

Extension of PHP SDK 4 for Laravel's custom session handling in L5.

Installation

  1. Get the repository files.
  2. Go to your project folder and open up composer.json with your favorite editor
  3. Find the "autoload" part, where you can see PSR-4 if using Laravel 5. Add the new namespace: "RapliAndras\\Facebook" : "vendor/rapliandras/facebook"
  4. Find the file FacebookLoginRedirectHelper.php and copy it to vendor/rapliandras/facebook/laravel. This is the only file in this package by the way :) It is responsible for a server side login to Facebook.
  5. Generate new classpaths with composer dump-autoload -o. The param -o is for optimized.
  6. Find the file FacebookController.php and copy it to your app/Http/Controllers folder. Now open it, and replace the dummy values with your APP_ID and APP_SECRET.
  7. Set up a route for the method FacebookController@login to check the result.
  8. Enjoy.

Note: The official Facebook PHP SDK 4 must be installed and autoloaded too of course!

License

MIT license. Andras Rapli, http://rapliandras.hu

About

Extension of FB PHP SDK 4 for Laravel's custom session handling in L5.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages