WebDialog.Builder
最新版本的 SDK 已不再提供此課程。
有此級別的更新版本。前往查看 最新版本。

Provides a builder that allows construction of an arbitary Facebook web dialog.

伸延:Object
套件:widget
建構函式
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.Builder(Context, Session, String, Bundle)

Constructor that builds a dialog for an authenticated user.

public WebDialog.Builder(Context context, Session session, String action, Bundle parameters)
參數說明
contextThe Context within which the dialog will be shown.
sessionThe Session representing an authenticating user to use for showing the dialog; must not be null, and must be opened.
actionThe portion of the dialog URL following www.facebook.com/dialog/. See https://developers.facebook.com/docs/reference/dialogs/ for details.
parametersA Bundle containing parameters to pass as part of the URL.
WebDialog.Builder(Context, String, String, Bundle)

Constructor that builds a dialog without an authenticated user.

public WebDialog.Builder(Context context, String applicationId, String action, Bundle parameters)
參數說明
contextThe Context within which the dialog will be shown.
applicationIdThe application ID to be included in the dialog URL.
actionThe portion of the dialog URL following www.facebook.com/dialog/. See https://developers.facebook.com/docs/reference/dialogs/ for details.
parametersA Bundle containing parameters to pass as part of the URL.
執行個體方法
setTheme(int)

Sets a theme identifier which will be passed to the underlying Dialog.

public BuilderBase setTheme(int theme)
參數說明
themeA theme identifier which will be passed to the Dialog class
Returns
The builder
setOnCompleteListener(OnCompleteListener)

Sets the listener which will be notified when the dialog finishes.

public BuilderBase setOnCompleteListener(OnCompleteListener listener)
參數說明
listenerThe listener to notify, or null if no notification is desired
Returns
The builder
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()
Returns
The WebDialog
getApplicationId()
protected String getApplicationId()
getContext()
protected Context getContext()
getTheme()
protected int getTheme()
getParameters()
protected Bundle getParameters()
getListener()
protected OnCompleteListener getListener()