# Initialization



The method **`FB.init()`** is used to initialize and setup the SDK. If you have followed our [SDK quickstart guide](https://developers.facebook.com/documentation/javascript/quickstart), you won&#039;t need to re-use this method, but you may want to customize the parameters used.

All other SDK methods **must be** called after this one, because they won&#039;t exist until you do.

```
FB.init(params)
```

## Parameters &#123;#parameters&#125;

| Name | Type | Description |
| --- | --- | --- |
| `params` | `object` | A collection of initialization parameters that control the setup of the SDK. Click for more info. |
| ↳&lt;br&gt;`appId` | `string` | Your application ID. If you don&#039;t have one find it in the [App dashboard](https://developers.facebook.com/apps) or go there to create a new app. Defaults to `null`. |
| ↳&lt;br&gt;`version` | `string` | Determines which versions of the Graph API and any API dialogs or plugins are invoked when using the `.api()` and `.ui()` functions. Valid values are determined by [currently available versions](https://developers.facebook.com/docs/apps/changelog), such as `&#039;v2.0&#039;`. This is a required parameter. |
| ↳&lt;br&gt;`cookie` | `bool` | Determines whether a cookie is created for the session or not. If enabled, it can be accessed by server-side code. Defaults to `false`. |
| ↳&lt;br&gt;`localStorage` | `bool` | Determines whether a long-lived access token for the session can be saved in localStorage. This enables maintaining a user&#039;s logged in status when 3rd party cookies are blocked from being sent to Facebook domains. Defaults to `true`. |
| ↳&lt;br&gt;`status` | `bool` | Determines whether the current login status of the user is freshly retrieved on every page load. If this is disabled, that status will have to be manually retrieved using [`.getLoginStatus()`](https://developers.facebook.com/documentation/javascript/reference/FB.getLoginStatus). Defaults to `false`. |
| ↳&lt;br&gt;`xfbml` | `bool` | Determines whether XFBML tags used by social plugins are parsed, and therefore whether the plugins are rendered or not. Defaults to `false`. |
| ↳&lt;br&gt;`frictionlessRequests` | `bool` | [Frictionless Requests](https://developers.facebook.com/docs/reference/dialogs/requests#frictionless_requests) are available to games on Facebook.com or on mobile web using the JavaScript SDK. This parameter determines whether they are enabled. Defaults to `false`. |
| ↳&lt;br&gt;`hideFlashCallback ` | `function` | This specifies a function that is called whenever it is necessary to hide Adobe Flash objects on a page. This is used when `.api()` requests are made, as Flash objects will always have a higher z-index than any other DOM element. See our [Custom Flash Hide Callback](https://developers.facebook.com/docs/games/gamesonfacebook/optimizing#handlingpopups) for more details on what to put in this function. Defaults to `null`. |

## Examples &#123;#examples&#125;

#### Example: Standard initialization code:

```
FB.init(&#123;
  appId      : &#039;&#123;your-app-id&#125;&#039;,
  status     : true,
  xfbml      : true,
  version    : &#039;v2.7&#039; // or v2.6, v2.5, v2.4, v2.3
&#125;);
```

