SessionState
This class is no longer available in the most recent version of the SDK.
A more recent version of this class is available. Check out the latest version.

Identifies the state of a Session.

Session objects implement a state machine that controls their lifecycle. This enum represents the states of the state machine.

Extends:Enum
Package:facebook
Class Methods
values()
public static SessionState values()
valueOf(String)
public static SessionState valueOf(String name)
ParameterDescription
name
Instance Methods
isOpened()

Returns a boolean indicating whether the state represents a successfully opened state in which the Session can be used with a Request.

public boolean isOpened()
Returns
A boolean indicating whether the state represents a successfully opened state in which the Session can be used with a <a href='Request'>Request</a>.
isClosed()

Returns a boolean indicating whether the state represents a closed Session that can no longer be used with a Request.

public boolean isClosed()
Returns
A boolean indicating whether the state represents a closed Session that can no longer be used with a <a href='Request'>Request</a>.
Constants
CREATED
Indicates that the Session has not yet been opened and has no cached token. Opening a Session in this state will involve user interaction.
public static final SessionState CREATED
CREATED_TOKEN_LOADED
Indicates that the Session has not yet been opened and has a cached token. Opening a Session in this state will not involve user interaction. If you are using Session from an Android Service, you must provide a TokenCachingStrategy implementation that contains a valid token to the Session constructor. The resulting Session will be created in this state, and you can then safely call open, passing null for the Activity.
public static final SessionState CREATED_TOKEN_LOADED
OPENING
Indicates that the Session is in the process of opening.
public static final SessionState OPENING
OPENED
Indicates that the Session is opened. In this state, the Session may be used with a Request.
public static final SessionState OPENED
OPENED_TOKEN_UPDATED
Indicates that the Session is opened and that the token has changed. In this state, the Session may be used with Request. Every time the token is updated, StatusCallback is called with this value.
public static final SessionState OPENED_TOKEN_UPDATED
CLOSED_LOGIN_FAILED
Indicates that the Session is closed, and that it was not closed normally. Typically this means that the open call failed, and the Exception parameter to StatusCallback will be non-null.
public static final SessionState CLOSED_LOGIN_FAILED
CLOSED
Indicates that the Session was closed normally.
public static final SessionState CLOSED