Facebook
Session.NewPermissionsRequest - Documentation - Meta for Developers
Session.NewPermissionsRequest
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.

A request to be used to request new permissions for a Session.

Extends: AuthorizationRequest
Package: facebook
Constructors
Session.NewPermissionsRequest(Activity, List)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest( Activity activity , List permissions )
Parameter Description
activity The Activity used to issue the request
permissions Additional permissions to request
Session.NewPermissionsRequest(Fragment, List)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest( Fragment fragment , List permissions )
Parameter Description
fragment The Fragment used to issue the request
permissions Additional permissions to request
Session.NewPermissionsRequest(Activity, String)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest( Activity activity , String permissions )
Parameter Description
activity The Activity used to issue the request
permissions Additional permissions to request
Session.NewPermissionsRequest(Fragment, String)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest( Fragment fragment , String permissions )
Parameter Description
fragment The Fragment used to issue the request
permissions Additional permissions to request
Instance Methods
setCallback(StatusCallback)

Sets the StatusCallback for the NewPermissionsRequest. Note that once the request is made, this callback will be added to the session, and will receive all future state changes on the session.

public final NewPermissionsRequest setCallback( StatusCallback statusCallback )
Parameter Description
statusCallback The SessionStatusCallback to notify regarding Session state changes.
Returns
The NewPermissionsRequest object to allow for chaining
setLoginBehavior(SessionLoginBehavior)

Sets the login behavior for the NewPermissionsRequest.

public final NewPermissionsRequest setLoginBehavior( SessionLoginBehavior loginBehavior )
Parameter Description
loginBehavior The SessionLoginBehavior that specifies what behaviors should be attempted during authorization.
Returns
The NewPermissionsRequest object to allow for chaining
setRequestCode(int)

Sets the request code for the NewPermissionsRequest.

public final NewPermissionsRequest setRequestCode( int requestCode )
Parameter Description
requestCode An integer that identifies this request. This integer will be used as the request code in onActivityResult.onActivityResult. This integer should be >= 0. If a value < 0 is passed in, then a default value will be used.
Returns
The NewPermissionsRequest object to allow for chaining
setDefaultAudience(SessionDefaultAudience)

Sets the defaultAudience for the OpenRequest.

public final NewPermissionsRequest setDefaultAudience( SessionDefaultAudience defaultAudience )
Parameter Description
defaultAudience A SessionDefaultAudience representing the default audience setting to request.
Returns
The NewPermissionsRequest object to allow for chaining
Design a Mobile Website
View Site in Mobile | Classic
Share by: