Session.NewPermissionsRequest
Cette classe n’est plus disponible dans la version la plus récente du SDK.
Une version plus récente de cette classe est disponible. Rendez-vous sur la dernière version.

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

Prolonge :AuthorizationRequest
Package :facebook
Constructeurs
Session.NewPermissionsRequest(Activity, List)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Activity activity, List permissions)
ParamètreDescription
activityThe Activity used to issue the request
permissionsAdditional permissions to request
Session.NewPermissionsRequest(Fragment, List)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Fragment fragment, List permissions)
ParamètreDescription
fragmentThe Fragment used to issue the request
permissionsAdditional permissions to request
Session.NewPermissionsRequest(Activity, String)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Activity activity, String permissions)
ParamètreDescription
activityThe Activity used to issue the request
permissionsAdditional permissions to request
Session.NewPermissionsRequest(Fragment, String)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Fragment fragment, String permissions)
ParamètreDescription
fragmentThe Fragment used to issue the request
permissionsAdditional permissions to request
Méthodes d’instance
setCallback(StatusCallback)

Sets the StatusCallback for the NewPermissionsRequest.

public final NewPermissionsRequest setCallback(StatusCallback statusCallback)
ParamètreDescription
statusCallbackThe 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)
ParamètreDescription
loginBehaviorThe 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)
ParamètreDescription
requestCodeAn 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)
ParamètreDescription
defaultAudienceA SessionDefaultAudience representing the default audience setting to request.
Returns
The NewPermissionsRequest object to allow for chaining