Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
125 lines (85 sloc) 4.19 KB

Facebook Connect JavaScript SDK

Facebook Connect is a set of APIs that make your application more social. With it you gain access to:

  1. Identity: the user's name, photo and more User.
  2. The Graph: the user's friends and connections Connection.
  3. Distribution: the Stream, and the ability to communicate Publishing.
  4. Integration: publishers, canvas pages, profile tabs.

This repository contains the open source JavaScript SDK that allows you to utilize the above on your website. Except as otherwise noted, the Facebook Connect JavaScript SDK is licensed under the Apache Licence, Version 2.0 (


This is an alpha release. In order to guide the development of the library and allow you to freely inspect and use the source, we have open sourced the client JavaScript SDK. We do not have all the features we intend to build, but we will be building them incrementally in a transparent manner.

Currently, we have the first iteration of the JavaScript APIs that allow you to:

  • Handle Authentication & Authorization
  • Make API calls
  • Publish to the Stream

Some major aspects that are still missing are:

  • Widgets
  • Data Access Abstractions

We will be actively iterating on this, and expect to have a beta release shortly. Once we've worked out all the kinks, we will announce the final release. Remember, this is an alpha release!


The examples are a good place to start. The minimal you'll need to have is:

<div id="fb-root"></div>
<script src=""></script>
  FB.init({ apiKey: 'YOUR API KEY' });

Note: For easier development, we also have a unminifed (raw code with comments) available using this URL:


We have made API documentation available for the public APIs here. In addition, the code itself contains full documentation for the private APIs if you want to study the internals.

We have a list of FAQs that detail some of the changes and provide information about the new SDK.

We are maintaining a changelog as we update the SDK. Since this is an Alpha SDK, we might need to break compatibility between releases if the need arises.

The repository also contains simple examples showing the use of the SDK with popular JavaScript libraries such as Dojo, jQuery, MooTools, Prototype and YUI.


We are relying on the GitHub issues tracker linked from above for feedback. File bugs or other issues here.


We are working hard to ensure your experience using Connect is stable. In order to keep us nimble and allow us to bring you new functionality, without compromising on stability, we have ensured full test coverage of the new SDK. We are including this in the open source repository to assure you of our commitment to quality, but also with the hopes that you will contribute back to help keep it stable. The easiest way to do so is to file bugs and include a test case.