A Facebook Connect plugin for symfony

As promised during the last symfony live conference, I finally release my current work on a Facebook Connect Plugin for symfony. It is inspired by the good sfFacebookPlugin by Jonathan Todd, which has however been unmaintained for quite some time. Since Facebook's platform is evolving every week and my focus was not on the Facebook platform but on the Facebook Connect functionality, I decided to create this new plugin.

It is for the moment VERY beta. It is used in two projects, http://www.allomatch.com which is a symfony 1.0/propel project and another project on symfony 1.2/doctrine. It is therefore compatible with both Doctrine and Propel. However some issues remain concerning 1.0 and 1.2 versions regarding some options, the tasks for example.

For the installation, the README is a good start but FAR from complete. I invite you to browse through the code to understand the logic and comment on this post if you have any question regarding installation. This will force me to improve the README.

I intend to improve the documentation in the very near future, so if you are not in a hurry, please wait. However I have already received dozens of mails concerning the current status, so I release it for those who need to start a project using Facebook Connect right now.

Here is the link to the plugin:

http://www.symfony-project.org/plugins/sfFacebookConnectPlugin

And here the presentation made at the sflive conference:

http://www.symfony-live.com/pdf/sflive09fr/theodo-symfony-facebook.pdf

Mots-clefs : , , ,

11 commentaires sur “A Facebook Connect plugin for symfony”

  1. Oncle Tom dit :

    Ah ah awesome! I was just starting today an FB Connect integration on a SF project :-) just a huge thanks!

  2. Matthieu dit :

    Great work Fabrice,

    Thanks for sharing.

    Matt.

  3. COil dit :

    Super sympa. :) Good job !

  4. Oncle Tom dit :

    I’ve contributed a first patch for restrictive routing purpose.

    http://trac.symfony-project.org/ticket/7065

  5. commited !

    It is a very good remark and I am happy to show contributions can be very quick. Just a small reserve, I am quite sure it is not 1.0 compatible, but since you thought about making it optional it in the app.yml file, it should not pose any problem to anybody.

    Thanks for the very good contribution !

  6. Oncle Tom dit :

    Yep I’m not sure the routing method works for 1.0 (I use the 1.2 one) but it can be overridden in all cases.

    One other remark: if a Profile attribute is “notnull: true”, the getOrCreate method will throw an exception because it won’t fill the mandatory fields.

    The Auth process is far from simple as some sites will require an account creation + FB linking, some account creation with FB + account profile completion, some others, just FB linking.

  7. Oncle Tom dit :

    Your latest commit breaks in the GuardAdapter as it call to sfMixer which is not consistent with the usage of Doctrine.

  8. Jean dit :

    Hey everybody,
    I’m experiencing an error while executing BasesfFacebookConnectAuthActions:executeSignin()

    I guess the error comes from sfFacebookDoctrineGuardAdapter::retrieveSfGuardUserByFacebookUid() most particularly this line :

    ->innerJoin(’u.Profile p’)

    I work remotly to test FB Connect, and the error log is :
    Unknown relation alias Profile, referer: http://www.myserver.com/

    Please help !
    Regards

  9. Tom: I have comitted the solution you sent me by mail.

    Jean: Damien Alexandre kindly sent me a patch to be able to configure the name of the “Profile” relationship. You will be able to configure it as soon as i commit it. Remember the plugin is still heavily in development !

  10. Kieu Anh Tuan dit :

    Hi,
    Really great piece of work. I’ve played around with the plugin and it works really well.

    I have some questions for you, when do you plan to complete the documentation? will mobile-enabled site be supported by sfFacebookConnect?

    Thanks

  11. Kieu Anh Tuan: a very thorough documentation is almost done! Should unfortunately be online end of december, but it will explain step by step how to configure your project for a Facebook app or Facebook Connect and also cover the most common problems Facebook developers face.

    As for mobile-enabled sites, this is indeed planned but no fixed schedule yet on my side. You are welcome to contribute yourself if you think you will work on that soon :-)

Laisser une réponse