A new Facebook Connect plugin for symfony 1: kdDoctrineGuardFacebookConnectPlugin

After some tests I realized that the plugin sfFacebookConnectPlugin created by fabriceb was no longer functional or maintained. I tried to correct some bugs but it’s a pain: the plugin is not adapted to the new version of the Facebook SDK.

So I have created new plugin called kdDoctrineGuardFacebookConnectPlugin available on GitHub or in the symfony 1 plugins repository. It provides a simple an easy way to add Facebook Connect support to your symfony 1 app and it works ! The code base is very small, easy to understand and has a voluntary limitation: only with sfDoctrineGuard auth method is supported (no Propel backend).

kdDoctrineGuardFacebookConnectPlugin adds a “Login with Facebook” button to the sfGuard signin form, automatically creates a sfGuard user and populates it with Facebook provided data (first name, last name, gender, location, hometown, Facebook profile link, …), and updates the profile if some data are changed on Facebook and provides a clean logout mechanism (from your app and from Facebook).

Downloads and installation instructions on the plugin GitHub page!

If  you are already using Symfony2, take a look at the noelg’s FacebookBundle.