Session.NewPermissionsRequest
最新版本的 SDK 已不再提供此課程。
有此級別的更新版本。前往查看 最新版本。

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

伸延:AuthorizationRequest
套件:facebook
建構函式
Session.NewPermissionsRequest(Activity, List)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Activity activity, List permissions)
參數說明
activityThe Activity used to issue the request
permissionsAdditional permissions to request
Session.NewPermissionsRequest(Activity, String)

Constructs a NewPermissionsRequest.

public Session.NewPermissionsRequest(Activity activity, String permissions)
參數說明
activityThe Activity used to issue the request
permissionsAdditional permissions to request
執行個體方法
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)
參數說明
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)
參數說明
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)
參數說明
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)
參數說明
defaultAudienceA SessionDefaultAudience representing the default audience setting to request.
Returns
The NewPermissionsRequest object to allow for chaining