Graph API Version

Initialization

The method FB.init() is used to initialize and setup the SDK. If you have followed our SDK quickstart guide, you won'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't exist until you do.

FB.init(params)

Parameters

Name Type Description

Vector

Vector

Vector

Vector

Vector

Vector

Vector

Vector

Vector

Examples

Example: Standard initialization code:

FB.init({
  appId            : '{your-app-id}',
  autoLogAppEvents : true,
  status           : true,
  xfbml            : true,
  version          : 'v2.9' // or v2.8, v2.7, v2.6, v2.5, v2.4, v2.3,
});