FBConnect

Posted May 23rd, 2012 with No Comments

FBConnect is a tiny and self-contained library to deal with Facebook SDK: just forget to put div#fb-root and enjoy the deferred object it returns.

Just include fbconnect.js somewhere in your HTML file and:

$.fb.connect('your_app_id')
  .done(function(fb_session) {
  // do something with your facebook session
  });

It’s possibile to specify some options:

$.fb.connect(
  'your_app_id',
  {
    status: true|false,
    cookie: true|false,
    locale: 'en_US'
  })

Refer to Facebook documentation for an explanation of each options.

The most important, and likely the only you will use, is *locale* which enables localization for the UI of Facebook Connect.

 View the repository on GitHub

Free for personal and commercial use under the MIT/GPL license used by the jQuery core libraries.

  • Categories

  • Tags

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2 other subscribers

  • Follow me on Twitter