JS API T FB.Facebook

From Facebook Developer Wiki

Jump to: navigation, search

Contents

[edit] class public sealed FB.Facebook

This contains static settings for the Facebook API client and cross-domain channels.

[edit] Base Class

System.Object

Follow the base class link to learn inherited methods and properties

[edit] Public Static Methods

public static void init (object appSettings)
Initialize Facebook app
public static void init (string apiKey, string xdChannelUrl, object appSettings)
Initialize Facebook app

[edit] Properties

[edit] public static baseDomain

Getter

public static string get_baseDomain()

Setter

public static void set_baseDomain( string value)

[edit] public static initialized

Get status of Facebook initialization as a Waitable object. This object will get updated after Facebook.init() is called.

Getter

public static Waitable get_initialized()

[edit] public static isInCanvas

Is this current page inside Facebook Canvas

Getter

public static bool get_isInCanvas()

[edit] public static sessionState

DEPRECATED This property is replaced by sessionWaitable and will be removed soon.

Getter

public static Waitable get_sessionState()

[edit] public static sessionWaitable

Get API session as a Waitable object. This object will get updated if the session was initially not available but becomes ready later.

Getter

public static Waitable get_sessionWaitable()

[edit] Fields

public static ApiClient apiClient
Facebook API client instance
public static string apiKey
Your application API key
public static string appSecret
Specify application secret to enable API calls that cannot be performed with session secret.

If you want to this field, you should set it immediately before calling FB.Facebook.init() function. SECURITY WARNING: App secret should never be used on any non-admin web pages. If app secret is exposed non-admin users or attackers, they can use the app secret to make APIs that can change your application settings or perform actions on other users of your applicaiton. As such, you should only specify app secret if you want to perform admin actions using this JavaScript library and should make sure to only use it in admin pages. App secret is a private key. Please refer to the platform developer's term of service at http://developers.facebook.com/terms.php for details.

public static object appSettings
A dictionary of advanced facebook settings. Currently supported key/value are:

'doNotUseCachedConnectState': bool -- By default, we check cookie for cached connect state. If this value is true, we will clear cached cookie value and not use it.

public static string version

Back to namespace FB

reference