PHPackages                             adrienbrault/oauth2-facebook-grant-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. adrienbrault/oauth2-facebook-grant-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

adrienbrault/oauth2-facebook-grant-bundle
=========================================

482PHP

Since Mar 17Pushed 12y ago3 watchersCompare

[ Source](https://github.com/adrienbrault/OAuth2FacebookGrantBundle)[ Packagist](https://packagist.org/packages/adrienbrault/oauth2-facebook-grant-bundle)[ RSS](/packages/adrienbrault-oauth2-facebook-grant-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

FSCOAuth2FacebookGrantBundle
============================

[](#fscoauth2facebookgrantbundle)

With this bundle, you can request an access token on your api (that uses FOSOAuthServerBundle) against a facebook access token. This bundle will check that the facebook access token is valid, and get the fb\_id of the user.

For example: you have an iOS app that needs a token to authenticate a user against your api, but you want to only show the Facebook SSO authentication to your user.

Installation
------------

[](#installation)

Add the bundle to your AppKernel

```
class AppKernel extends Kernel
    public function registerBundles()
        {
            $bundles = array(
                ...
                new AdrienBrault\OAuth2FacebookGrantBundle\ABOAuth2FacebookGrantBundle(),
```

Configure the bundle:

```
ab_oauth2_facebook_grant:
    user_provider: bundle.facebook_user_provider
    uri: "http://grants.yourapi.com/facebook_access_token"
```

And implement your `bundle.facebook_user_provider` like this:

```
