Download the PHP package grom/facebook-service-provider without Composer
On this page you can find all versions of the php package grom/facebook-service-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download grom/facebook-service-provider
More information about grom/facebook-service-provider
Files in grom/facebook-service-provider
Package facebook-service-provider
Short Description Facebook API and connect integration into your Silex applications
License MIT
Informations about the package facebook-service-provider
FacebookServiceProvider
The FacebookServiceProvider adds Facebook Connect and API to your applications.
It integrates FOSFacebookBundle into Silex.
Parameters
- facebook.config: Configuration of your Facebook application. (appId, secret, fileUpload, )
- facebook.permissions: List of permissions required to connect.
- __facebook.session_prefix:__ Prefix for Facebook data.
Services
- facebook: Facebook SDK. Read online documentation
Installation
Using composer :
composer require grom/facebook-service-provider
Registering
First, you must register the SecurityServiceProvider.
Authentication
To authenticate users with Facebook Connect, first you need to register the SecurityServiceProvider.
To enable Facebook authentication, just add a "facebook" option to your firewall configuration.
If you don't set a login_path
, the user is redirected to Facebook.
Developers of embedded Facebook Applications may define app_url
,
server_url
and display
options.
Defining a custom User Provider and automatic user creation
The UserProvider used to find Facebook user is similar to the username/password UserProvider. The differences are that users are identified by their Facebook UID instead of their username.
If the Facebook UID is not found in your database, the user provider
can create the user automatically. You simply have to implements the
method FOS\FacebookBundle\Security\User\UserProviderInterface::createUserFromUid
Now use your custom user provider.
Facebook Graph API
Once a user is authenticated with Facebook, you can make Facebook Graph API requests.
Look at the Facebook Graph Explorer.