PHPackages                             kl3ryk/symfony-facebook-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. [API Development](/categories/api)
4. /
5. kl3ryk/symfony-facebook-bundle

ActiveLibrary[API Development](/categories/api)

kl3ryk/symfony-facebook-bundle
==============================

This bundle provides ready to use official Facebook SDK and common Facebook configuration for any Symfony bundle.

1.5.4(12y ago)116511MITPHPPHP &gt;=5.4

Since Jul 8Pushed 12y ago2 watchersCompare

[ Source](https://github.com/kl3ryk/symfony-facebook-bundle)[ Packagist](https://packagist.org/packages/kl3ryk/symfony-facebook-bundle)[ RSS](/packages/kl3ryk-symfony-facebook-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (8)Versions (12)Used By (1)

Symfony Facebook Bundle [![Build Status](https://camo.githubusercontent.com/80832df5382342f67e447a166901a373836f1bfe7df5261b2d339667124f312f/68747470733a2f2f7472617669732d63692e6f72672f6b6c3372796b2f73796d666f6e792d66616365626f6f6b2d62756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/kl3ryk/symfony-facebook-bundle)
=================================================================================================================================================================================================================================================================================================================================================

[](#symfony-facebook-bundle-)

This bundle provides **ready to use official Facebook SDK client** and common Facebook configuration (implements *PrependExtensionInterface*, see: [http://symfony.com/doc/current/cookbook/bundles/prepend\_extension.html](http://symfony.com/doc/current/cookbook/bundles/prepend_extension.html)) for any Symfony bundle.

Facebook SDK client:

- is integrated with Symfony session storage (unlike vanilla client which uses native PHP sessions)
- is integrated with Symfony logger
- uses Symfony "Request" object internally

Bundles Using This Bundle
-------------------------

[](#bundles-using-this-bundle)

- [kl3ryk/symfony-facebook-authentication-bundle](https://github.com/kl3ryk/symfony-facebook-authentication-bundle) (of course)

If you are using this bundle, contact me or update README in your pull request.

For Facebook SDK Users
----------------------

[](#for-facebook-sdk-users)

### Using Facebook SDK

[](#using-facebook-sdk)

```
# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
```

```
// Controllers/YourSymfonyController.php

class YourSymfonyController extends Controller
{
    function indexAction()
    {
        $readyToUseFacebookSdk = $this->get('facebook');
        // ... done
    }
}
```

### Using Extended Facebook SDK Configuration

[](#using-extended-facebook-sdk-configuration)

```
# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
    file_upload: true # indicate if your server configuration allows CURL @ file uploads
    permissions: # see: https://developers.facebook.com/docs/reference/login/#permissions
        - publish_actions
        - user_games_activity
        - ... etc
    trust_proxy_headers: true # Facebook SDK now trusts EVERY HTTP_X_FORWARDED_* header
```

For Symfony Bundle Developers
-----------------------------

[](#for-symfony-bundle-developers)

### Automating Your Bundle Facebook Configuration With Laelaps Bundle

[](#automating-your-bundle-facebook-configuration-with-laelaps-bundle)

```
// Appkernel.php

class AppKernel
{
    public function registerBundles()
    {
        return [
            // ...
            new \Laelaps\Bundle\Facebook\FacebookBundle,
            // ...
        ];
    }
}
```

```
# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
```

```
// DependencyInjection/YourExtension.php

use Laelaps\Bundle\Facebook\FacebookExtensionInterface;
use Laelaps\Bundle\Facebook\FacebookExtensionTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class YourExtension extends Extension implements FacebookExtensionInterface
{
    use FacebookExtensionTrait;

    public function load(array $configs, ContainerBuilder $container)
    {
        print_r($configs);
        /*
            (
                [application_id] => example_application_id
                [secret] => example_secret
                [file_upload] =>
                [permissions] => Array
                    (
                    )

                [trust_proxy_headers] =>
            )
        */
    }
}
```

### Prefixing Configuration

[](#prefixing-configuration)

```
// DependencyInjection/YourExtension.php

use Laelaps\Bundle\Facebook\FacebookExtensionInterface;
use Laelaps\Bundle\Facebook\FacebookExtensionTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class YourExtension extends Extension implements FacebookExtensionInterface
{
    use FacebookExtensionTrait;

    public function getFacebookConfigurationPrefix(array $config, ContainerBuilder $container)
    {
        return 'facebook_';
    }

    public function load(array $configs, ContainerBuilder $container)
    {
        print_r($configs[0]);
        /*
            (
                [facebook_application_id] => example_application_id
                [facebook_secret] => example_secret
                [facebook_file_upload] =>
                [facebook_permissions] => Array
                    (
                    )

                [facebook_trust_proxy_headers] =>

            )
        */
    }
}
```

Semantic Versioning
-------------------

[](#semantic-versioning)

This repository follows [Semantic Versioning 2.0.0](http://semver.org/).

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

11

Last Release

4667d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/335431?v=4)[Paweł Łaskarzewski](/maintainers/kl3ryk)[@kl3ryk](https://github.com/kl3ryk)

---

Top Contributors

[![kl3ryk](https://avatars.githubusercontent.com/u/335431?v=4)](https://github.com/kl3ryk "kl3ryk (5 commits)")

---

Tags

symfonybundlefacebook

### Embed Badge

![Health badge](/badges/kl3ryk-symfony-facebook-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kl3ryk-symfony-facebook-bundle/health.svg)](https://phpackages.com/packages/kl3ryk-symfony-facebook-bundle)
```

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

230308.8k2](/packages/sensiolabs-gotenberg-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)[mtarld/api-platform-ms-bundle

API Platform Microservice Bundle

7124.5k](/packages/mtarld-api-platform-ms-bundle)[stfalcon-studio/api-bundle

Base classes and helper services to build API application via Symfony.

1034.6k](/packages/stfalcon-studio-api-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
