LoginManager
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

This class manages login and permissions for Facebook.

ขยาย:Object
แพ็คเกจ:login
วิธีการคลาส
getInstance()

Getter for the login manager.

public static LoginManager getInstance()
Returns
The login manager.
วิธีการแบบอินสแตนซ์
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)
พารามิเตอร์คำอธิบาย
activityThe activity which is starting the login process.
responseThe 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)
พารามิเตอร์คำอธิบาย
fragmentThe fragment which is starting the login process.
responseThe 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)
พารามิเตอร์คำอธิบาย
fragmentThe android.app.Fragment which is starting the login process.
responseThe response that has the error.
registerCallback(CallbackManager, FacebookCallback)

Registers a login callback to the given callback manager.

public void registerCallback(CallbackManager callbackManager, FacebookCallback callback)
พารามิเตอร์คำอธิบาย
callbackManagerThe callback manager that will encapsulate the callback.
callbackThe login callback that will be called on login completion.
getLoginBehavior()

Getter for the login behavior.

public LoginBehavior getLoginBehavior()
Returns
The login behavior.
setLoginBehavior(LoginBehavior)

Setter for the login behavior.

public LoginManager setLoginBehavior(LoginBehavior loginBehavior)
พารามิเตอร์คำอธิบาย
loginBehaviorThe login behavior.
Returns
The login manager.
getDefaultAudience()

Getter for the default audience.

public DefaultAudience getDefaultAudience()
Returns
The default audience.
setDefaultAudience(DefaultAudience)

Setter for the default audience.

public LoginManager setDefaultAudience(DefaultAudience defaultAudience)
พารามิเตอร์คำอธิบาย
defaultAudienceThe default audience.
Returns
The login manager.
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)
พารามิเตอร์คำอธิบาย
fragmentThe android.support.v4.app.Fragment which is starting the login process.
permissionsThe requested permissions.
logInWithReadPermissions(Fragment, Collection)

Logs the user in with the requested read permissions.

public void logInWithReadPermissions(Fragment fragment, Collection permissions)
พารามิเตอร์คำอธิบาย
fragmentThe android.app.Fragment which is starting the login process.
permissionsThe requested permissions.
logInWithReadPermissions(Activity, Collection)

Logs the user in with the requested read permissions.

public void logInWithReadPermissions(Activity activity, Collection permissions)
พารามิเตอร์คำอธิบาย
activityThe activity which is starting the login process.
permissionsThe requested permissions.
logInWithPublishPermissions(Fragment, Collection)

Logs the user in with the requested publish permissions.

public void logInWithPublishPermissions(Fragment fragment, Collection permissions)
พารามิเตอร์คำอธิบาย
fragmentThe android.support.v4.app.Fragment which is starting the login process.
permissionsThe requested permissions.
logInWithPublishPermissions(Fragment, Collection)

Logs the user in with the requested publish permissions.

public void logInWithPublishPermissions(Fragment fragment, Collection permissions)
พารามิเตอร์คำอธิบาย
fragmentThe android.app.Fragment which is starting the login process.
permissionsThe requested permissions.
logInWithPublishPermissions(Activity, Collection)

Logs the user in with the requested publish permissions.

public void logInWithPublishPermissions(Activity activity, Collection permissions)
พารามิเตอร์คำอธิบาย
activityThe activity which is starting the login process.
permissionsThe requested permissions.
createLoginRequest(Collection)
protected Request createLoginRequest(Collection permissions)
พารามิเตอร์คำอธิบาย
permissions