com.facebook
Class Session.OpenRequest

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

public static final class Session.OpenRequest
extends Session.AuthorizationRequest

A request used to open a Session.

See Also:
Serialized Form

Constructor Summary
Session.OpenRequest(Activity activity)
          Constructs an OpenRequest.
Session.OpenRequest(Fragment fragment)
          Constructs an OpenRequest.
 
Method Summary
 Session.OpenRequest setCallback(Session.StatusCallback statusCallback)
          Sets the StatusCallback for the OpenRequest.
 Session.OpenRequest setDefaultAudience(SessionDefaultAudience defaultAudience)
          Sets the defaultAudience for the OpenRequest.
 Session.OpenRequest setLoginBehavior(SessionLoginBehavior loginBehavior)
          Sets the login behavior for the OpenRequest.
 Session.OpenRequest setPermissions(List<String> permissions)
          Sets the permissions for the OpenRequest.
 Session.OpenRequest setRequestCode(int requestCode)
          Sets the request code for the OpenRequest.
 
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.OpenRequest

public Session.OpenRequest(Activity activity)
Constructs an OpenRequest.

Parameters:
activity - the Activity to use to open the Session

Session.OpenRequest

public Session.OpenRequest(Fragment fragment)
Constructs an OpenRequest.

Parameters:
fragment - the Fragment to use to open the Session
Method Detail

setCallback

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

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

setLoginBehavior

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

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

setRequestCode

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

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 OpenRequest object to allow for chaining

setPermissions

public final Session.OpenRequest setPermissions(List<String> permissions)
Sets the permissions for the OpenRequest.

Parameters:
permissions - A List<String> representing the permissions to request during the authentication flow. A null or empty List represents basic permissions.
Returns:
the OpenRequest object to allow for chaining

setDefaultAudience

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

This is only used during Native login using a sufficiently recent facebook app.

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