Download the PHP package welderlourenco/laravel-facebook without Composer
On this page you can find all versions of the php package welderlourenco/laravel-facebook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download welderlourenco/laravel-facebook
More information about welderlourenco/laravel-facebook
Files in welderlourenco/laravel-facebook
Package laravel-facebook
Short Description The cleaner and more organized bridge from you to facebook platform.
License MIT
Homepage https://github.com/welderlourenco/laravel-facebook
Informations about the package laravel-facebook
Laravel Facebook
The cleaner and more organized bridge from you to facebook platform.
Introduction
Laravel Facebook is the most simple solution for developers that need fast, autonomous and secure integration with the Facebook platform. Using the facebook php sdk v4 from April 28, 2014, Laravel Facebook establishes the cleaner and more organized intermediation between you and the platform.
'It just builds a bridge. You will have to pass for it.' -- me
Needed knowledge
Facebook Platform utilizes their Graph API as a primary way to get data in and out of Facebook's social graph. In order to get to the bottom at this package, you'll need to have the basic knowledge in access tokens and facebook permissions, but don't worry, it's really not that hard.
Instalation
Required steps
In the require key of master composer.json file add the following.
Run the Composer update comand
Once this operation completes, the final step is to add the provider and the alias in the app/config/app.php config file.
Configuration
Run the Config Publish command
Go to the generated config file in your application
Available Methods / Usage
In any page, use the connect() method without passing any arguments to get a instance of the FacebookRedirectLoginHelper object, allowing you to call its native methods.
Example: Get the login url.
Laravel Facebook allows you to chain these methods, looking way more pretty.
You can pass an array to the getLoginUrl method to define the scope.
In the redirect page, call the process() method to process the facebook answer and get a instance of the FacebookSession object, allowing you to call its native methods.
Example: Process the facebook redirect, transform it to long-lived access token and get the access token.
In any page, use the connect() method again passing a accessToken as argument to get a instance of FacebookSession object, allowing you to call its native methods.
Example: Get session info.
In any page use the api() method passing 3 arguments to get the GraphObject object, allowing you to call its native methods.
Example: Process the facebook redirect, transform it to long-lived access token and get the access token and the user personal info.
In any page, before calling the connect() or process() method use the change() passing 2 required arguments and 2 optional to change the app before connecting.
Example: Get the login url from another app.
Thanks
Thank God for the knowledge to write all this.