Getting Started with the JavaScript Library

From Facebook Developer Wiki

Jump to: navigation, search

Facebook Connect sites use the JavaScript Client Library to access Facebook Platform via JavaScript. Here are some tips to help you get started.

  • To use the Facebook Platform REST API with Connect, use the FB.ApiClient class.
    Note: Not all API methods are supported. Which methods you can use depend on whether or not you're using a session secret (which you get when you create an application with the Facebook Developer application -- see Trying Out Facebook Connect for details). If you're not using an application secret, you can't use admin methods or methods that set data on a profile (like profile.setFBML).
  • To determine the user's Facebook Connect state (whether the user has authorized your site, and if so, whether the user is logged in or has connected accounts), use FB.ConnectState -- which describes the user's Connect state (used in connect.getStatus).
reference