getInstance()
Getter for the login manager.
public static LoginManager getInstance()
setSuccessResult(Intent, Bundle)
public static void setSuccessResult(Intent intent, Bundle values)
參數 | 說明 |
---|---|
intent | |
values |
resolveError(Activity, GraphResponse)
Starts the login process to resolve the error defined in the response. The registered login callbacks will be called on completion.
public void resolveError(Activity activity, GraphResponse response)
參數 | 說明 |
---|---|
activity | The activity which is starting the login process. |
response | The response that has the error. |
resolveError(Fragment, GraphResponse)
Starts the login process to resolve the error defined in the response. The registered login callbacks will be called on completion.
public void resolveError(Fragment fragment, GraphResponse response)
參數 | 說明 |
---|---|
fragment | The fragment which is starting the login process. |
response | The response that has the error. |
resolveError(Fragment, GraphResponse)
Starts the login process to resolve the error defined in the response. The registered login callbacks will be called on completion.
public void resolveError(Fragment fragment, GraphResponse response)
參數 | 說明 |
---|---|
fragment | The android.app.Fragment which is starting the login process. |
response | The response that has the error. |
registerCallback(CallbackManager, FacebookCallback)
Registers a login callback to the given callback manager.
public void registerCallback(CallbackManager callbackManager, FacebookCallback callback)
參數 | 說明 |
---|---|
callbackManager | The callback manager that will encapsulate the callback. |
callback | The login callback that will be called on login completion. |
getLoginBehavior()
Getter for the login behavior.
public LoginBehavior getLoginBehavior()
setLoginBehavior(LoginBehavior)
Setter for the login behavior.
public LoginManager setLoginBehavior(LoginBehavior loginBehavior)
參數 | 說明 |
---|---|
loginBehavior | The login behavior. |
getDefaultAudience()
Getter for the default audience.
public DefaultAudience getDefaultAudience()
setDefaultAudience(DefaultAudience)
Setter for the default audience.
public LoginManager setDefaultAudience(DefaultAudience defaultAudience)
參數 | 說明 |
---|---|
defaultAudience | The default audience. |
logOut()
Logs out the user.
public void logOut()
logInWithReadPermissions(Fragment, Collection)
Logs the user in with the requested read permissions.
public void logInWithReadPermissions(Fragment fragment, Collection permissions)
參數 | 說明 |
---|---|
fragment | The android.support.v4.app.Fragment which is starting the login process. |
permissions | The requested permissions. |
logInWithReadPermissions(Fragment, Collection)
Logs the user in with the requested read permissions.
public void logInWithReadPermissions(Fragment fragment, Collection permissions)
參數 | 說明 |
---|---|
fragment | The android.app.Fragment which is starting the login process. |
permissions | The requested permissions. |
logInWithReadPermissions(Activity, Collection)
Logs the user in with the requested read permissions.
public void logInWithReadPermissions(Activity activity, Collection permissions)
參數 | 說明 |
---|---|
activity | The activity which is starting the login process. |
permissions | The requested permissions. |
logInWithPublishPermissions(Fragment, Collection)
Logs the user in with the requested publish permissions.
public void logInWithPublishPermissions(Fragment fragment, Collection permissions)
參數 | 說明 |
---|---|
fragment | The android.support.v4.app.Fragment which is starting the login process. |
permissions | The requested permissions. |
logInWithPublishPermissions(Fragment, Collection)
Logs the user in with the requested publish permissions.
public void logInWithPublishPermissions(Fragment fragment, Collection permissions)
參數 | 說明 |
---|---|
fragment | The android.app.Fragment which is starting the login process. |
permissions | The requested permissions. |
logInWithPublishPermissions(Activity, Collection)
Logs the user in with the requested publish permissions.
public void logInWithPublishPermissions(Activity activity, Collection permissions)
參數 | 說明 |
---|---|
activity | The activity which is starting the login process. |
permissions | The requested permissions. |
createLoginRequest(Collection)
protected Request createLoginRequest(Collection permissions)
參數 | 說明 |
---|---|
permissions |