2017 © Pedro Peláez
 

library symfony-facebook-bundle

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

image

kl3ryk/symfony-facebook-bundle

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

  • Thursday, September 19, 2013
  • by kl3ryk
  • Repository
  • 2 Watchers
  • 1 Stars
  • 157 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

Symfony Facebook Bundle Build Status

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) for any Symfony bundle., (*1)

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, (*2)

Bundles Using This Bundle

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

For Facebook SDK Users

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

# 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

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

// 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

This repository follows Semantic Versioning 2.0.0., (*4)

The Versions

19/09 2013

1.x-dev

1.9999999.9999999.9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

19/09 2013

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

19/09 2013

1.5.4

1.5.4.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

19/09 2013

1.5.3

1.5.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

19/09 2013

1.5.2

1.5.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

24/08 2013

v1.5.1

1.5.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk
by Paweł Łaskarzewski

bundle symfony facebook

13/07 2013

1.5.0

1.5.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk

bundle symfony facebook

12/07 2013

1.4.0

1.4.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk

bundle symfony facebook

11/07 2013

1.3.0

1.3.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk

bundle symfony facebook

11/07 2013

1.2.0

1.2.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mateusz Charytoniuk

bundle symfony facebook

09/07 2013