After loading the JavaScript SDK, call FB.init to initialize the SDK with your app ID. This will let you make calls against the Facebook API.
If you're using the SDK alongside jQuery or RequireJS, the following guides may be useful:
Note: All FB.API methods must be called after FB.init.
| Name | Type | Required | Description |
|---|---|---|---|
| options | Object | yes | See Options below |
| Property | Type | Description | Argument | Default |
|---|---|---|---|---|
appId |
String | Your application ID. | Optional | null |
cookie |
Boolean | true to enable cookie support. |
Optional | false |
logging |
Boolean | false to disable logging. |
Optional | true |
status |
Boolean | true to fetch fresh status. |
Optional | true |
xfbml |
Boolean | true to parse XFBML tags. |
Optional | false |
channelUrl |
String | Specifies the URL of a custom URL channel file. This file must contain a single script element pointing to the JavaScript SDK URL. |
Optional | null |
authResponse |
Object | Manually set the object retrievable from getAuthResponse. |
Optional | true |
frictionlessRequests |
boolean | see Frictionless Requests | Optional | false |
hideFlashCallback |
Object | see Custom Flash Hide Callback | Optional | null |