LiveConnectClient initWithClientId:scopes:delegate method

Performs an asynchronous initialize of a new instance of the LiveConnectClient class with a client ID, scopes, and optionally, a LiveAuthDelegate.

Signature

- (id) initWithClientId:(NSString *)clientId
                 scopes:(NSArray *)scopes
               delegate:(id<LiveAuthDelegate>)delegate;

Parameters

Name

Datatype

Description

clientId

NSString

Required. The client ID value of the app when registered on the Live SDK app management site.

scopes

NSArray

Optional. An array of scope values that determines the initialization scopes.

Note

The app may retrieve the app session during the initialization process. The scopes value is passed to the Live authentication server, which returns a user session with an access token if the authenticated user has already given consent for the scopes passed in to the app. Otherwise, the server rejects the request to send back authentication session data.

delegate

id<LiveAuthDelegate>

Optional. An app class instance that implements the LiveAuthDelegate protocol.

Returns

Nothing.

Defined in

LiveConnectClient.h

Remarks

An instance of the LiveConnectClient class must be initialized before other methods can be invoked. Invoking any methods other than init* on an uninitialized instance results in an exception. If an init* method is used on an instance of the LiveConnectClient class that is already initialized, it is silently ignored.

The initialization process retrieves the user authentication session using a refresh token that persisted in the device, if available.

See also

LiveConnectClient class