com.facebook
Class Session.NewPermissionsRequest

java.lang.Object
  extended by com.facebook.Session.AuthorizationRequest
      extended by com.facebook.Session.NewPermissionsRequest
All Implemented Interfaces:
Serializable
Enclosing class:
Session

public static final class Session.NewPermissionsRequest
extends Session.AuthorizationRequest

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

See Also:
Serialized Form

Constructor Summary
Session.NewPermissionsRequest(Activity activity, List<String> permissions)
          Constructs a NewPermissionsRequest.
Session.NewPermissionsRequest(Fragment fragment, List<String> permissions)
          Constructs a NewPermissionsRequest.
 
Method Summary
 Session.NewPermissionsRequest setCallback(Session.StatusCallback statusCallback)
          Sets the StatusCallback for the NewPermissionsRequest.
 Session.NewPermissionsRequest setDefaultAudience(SessionDefaultAudience defaultAudience)
          Sets the defaultAudience for the OpenRequest.
 Session.NewPermissionsRequest setLoginBehavior(SessionLoginBehavior loginBehavior)
          Sets the login behavior for the NewPermissionsRequest.
 Session.NewPermissionsRequest setRequestCode(int requestCode)
          Sets the request code for the NewPermissionsRequest.
 
Methods inherited from class com.facebook.Session.AuthorizationRequest
setIsLegacy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session.NewPermissionsRequest

public Session.NewPermissionsRequest(Activity activity,
                                     List<String> permissions)
Constructs a NewPermissionsRequest.

Parameters:
activity - the Activity used to issue the request
permissions - additional permissions to request

Session.NewPermissionsRequest

public Session.NewPermissionsRequest(Fragment fragment,
                                     List<String> permissions)
Constructs a NewPermissionsRequest.

Parameters:
fragment - the Fragment used to issue the request
permissions - additional permissions to request
Method Detail

setCallback

public final Session.NewPermissionsRequest setCallback(Session.StatusCallback statusCallback)
Sets the StatusCallback for the NewPermissionsRequest.

Parameters:
statusCallback - The SessionStatusCallback to notify regarding Session state changes.
Returns:
the NewPermissionsRequest object to allow for chaining

setLoginBehavior

public final Session.NewPermissionsRequest setLoginBehavior(SessionLoginBehavior loginBehavior)
Sets the login behavior for the NewPermissionsRequest.

Parameters:
loginBehavior - The SessionLoginBehavior that specifies what behaviors should be attempted during authorization.
Returns:
the NewPermissionsRequest object to allow for chaining

setRequestCode

public final Session.NewPermissionsRequest setRequestCode(int requestCode)
Sets the request code for the NewPermissionsRequest.

Parameters:
requestCode - An integer that identifies this request. This integer will be used as the request code in 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

public final Session.NewPermissionsRequest setDefaultAudience(SessionDefaultAudience defaultAudience)
Sets the defaultAudience for the OpenRequest.

Parameters:
defaultAudience - A SessionDefaultAudience representing the default audience setting to request.
Returns:
the NewPermissionsRequest object to allow for chaining