Provides a builder that allows construction of the parameters for showing the Requests Dialog.
ขยาย: | Object |
แพ็คเกจ: | widget |
WebDialog.BuilderBase(Context, String)
protected WebDialog.BuilderBase(Context context, String action)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | |
action |
WebDialog.BuilderBase(Context, Session, String, Bundle)
protected WebDialog.BuilderBase(Context context, Session session, String action, Bundle parameters)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | |
session | |
action | |
parameters |
WebDialog.BuilderBase(Context, String, String, Bundle)
protected WebDialog.BuilderBase(Context context, String applicationId, String action, Bundle parameters)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | |
applicationId | |
action | |
parameters |
WebDialog.RequestsDialogBuilder(Context)
Constructor that builds a Requests Dialog using either the active session, or the application ID specified in the application/meta-data.
public WebDialog.RequestsDialogBuilder(Context context)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | The Context within which the dialog will be shown. |
WebDialog.RequestsDialogBuilder(Context, Session)
Constructor that builds a Requests Dialog using the provided session.
public WebDialog.RequestsDialogBuilder(Context context, Session session)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | The Context within which the dialog will be shown. |
session | The Session representing an authenticating user to use for showing the dialog; must not be null, and must be opened. |
WebDialog.RequestsDialogBuilder(Context, Session, Bundle)
Constructor that builds a Requests Dialog using the provided session and parameters.
public WebDialog.RequestsDialogBuilder(Context context, Session session, Bundle parameters)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | The Context within which the dialog will be shown. |
session | The Session representing an authenticating user to use for showing the dialog; must not be null, and must be opened. |
parameters | A Bundle containing parameters to pass as part of the dialog URL. No validation is done on these parameters; it is the caller's responsibility to ensure they are valid. For more information, see https://developers.facebook.com/docs/reference/dialogs/requests/. |
WebDialog.RequestsDialogBuilder(Context, String, Bundle)
Constructor that builds a Requests Dialog using the provided application ID and parameters.
public WebDialog.RequestsDialogBuilder(Context context, String applicationId, Bundle parameters)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | The Context within which the dialog will be shown. |
applicationId | The application ID to use. If null, the application ID specified in the application/meta-data will be used instead. |
parameters | A Bundle containing parameters to pass as part of the dialog URL. No validation is done on these parameters; it is the caller's responsibility to ensure they are valid. For more information, see https://developers.facebook.com/docs/reference/dialogs/requests/. |
setTheme(int)
Sets a theme identifier which will be passed to the underlying Dialog.
public BuilderBase setTheme(int theme)
พารามิเตอร์ | คำอธิบาย |
---|---|
theme | A theme identifier which will be passed to the Dialog class |
setOnCompleteListener(OnCompleteListener)
Sets the listener which will be notified when the dialog finishes.
public BuilderBase setOnCompleteListener(OnCompleteListener listener)
พารามิเตอร์ | คำอธิบาย |
---|---|
listener | The listener to notify, or null if no notification is desired |
build()
Constructs a WebDialog using the parameters provided. The dialog is not shown, but is ready to be shown by calling Dialog.show().
public WebDialog build()
getApplicationId()
protected String getApplicationId()
getContext()
protected Context getContext()
getTheme()
protected int getTheme()
getParameters()
protected Bundle getParameters()
getListener()
protected OnCompleteListener getListener()
setMessage(String)
Sets the string users receiving the request will see. The maximum length is 60 characters.
public RequestsDialogBuilder setMessage(String message)
พารามิเตอร์ | คำอธิบาย |
---|---|
message | The message |
setTo(String)
Sets the user ID or user name the request will be sent to. If this is not specified, a friend selector will be displayed and the user can select up to 50 friends.
public RequestsDialogBuilder setTo(String id)
พารามิเตอร์ | คำอธิบาย |
---|---|
id | The id or user name to send the request to |
setData(String)
Sets optional data which can be used for tracking; maximum length is 255 characters.
public RequestsDialogBuilder setData(String data)
พารามิเตอร์ | คำอธิบาย |
---|---|
data | The data |
setTitle(String)
Sets an optional title for the dialog; maximum length is 50 characters.
public RequestsDialogBuilder setTitle(String title)
พารามิเตอร์ | คำอธิบาย |
---|---|
title | The title |