kdDoctrineGuardFacebookConnectPlugin - 0.0.1

Facebook Connect integration

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Dependencies Releases Changelog Contribute
Show source

Facebook Connect for symfony and sfGuard

kdDoctrineGuardFacebookConnectPlugin provides an easy way to sign into a symfony 1 application using a Facebook account. kdDoctrineGuardFacebookConnectPlugin extends sfDoctrineGuardPlugin.


  • Install sfDoctrineGuardPlugin properly
  • Install kdDoctrineGuardFacebookConnectPlugin

    # Example using git git submodule add http://github.com/dunglas/kdDoctrineGuardFacebookConnectPlugin.git plugins/kdDoctrineGuardFacebookConnectPlugin

  • Create your Facebook application

  • Enable the plugin in the config/ProjectConfiguration.class.php file after sfGuardPlugin.

    class ProjectConfiguration extends sfProjectConfiguration { public function setup() { $this->enablePlugins('sfDoctrinePlugin'); $this->enablePlugins('sfDoctrineGuardPlugin'); $this->enablePlugins('kdDoctrineGuardFacebookConnectPlugin'); } }

  • Edit app.yml to match your Facebook application settings

    all: facebook: appId: xxx # Your app id secret: xxx # Your app secret cookie: true # Use cookie script_lang: en_US # Connect button and JavaScript language

  • Edit filters.yml to add the FacebookConnect filter

    rendering: security:

    # Facebook Connect facebook: class: kdDoctrineGuardFacebookConnectFilter

    # Remember me remember_me: class: sfGuardRememberMeFilter

    # insert your own filters here

    cache: execution:

  • Enable the kdGuardAuthFacebookConnect module and set is a signin module in settings.yml

    all: .settings: # ... enabled_modules: [default, sfGuardAuth, kdGuardAuthFacebookConnect]

      login_module:           kdGuardAuthFacebookConnect
      login_action:           signin
  • Clear the cache with php symfony cc and enjoy!