FacebookDialog
このクラスには新しいバージョンがあります。ご確認ください。 最新バージョン
拡張:Object
パッケージ:widget
クラスメソッド
getNativeDialogDidComplete(Bundle)

Determines whether the native dialog completed normally (without error or exception).

public static boolean getNativeDialogDidComplete(Bundle result)
パラメーター説明
resultThe bundle passed back to onActivityResult
Returns
True if the native dialog completed normally
getNativeDialogCompletionGesture(Bundle)

Returns the gesture with which the user completed the native dialog. This is only returned if the user has previously authorized the calling app with basic permissions.

public static String getNativeDialogCompletionGesture(Bundle result)
パラメーター説明
resultThe bundle passed back to onActivityResult
Returns
"post" or "cancel" as the completion gesture
getNativeDialogPostId(Bundle)

Returns the id of the published post. This is only returned if the user has previously given the app publish permissions.

public static String getNativeDialogPostId(Bundle result)
パラメーター説明
resultThe bundle passed back to onActivityResult
Returns
The id of the published post
handleActivityResult(Context, PendingCall, int, Intent, Callback)

Parses the results of a dialog activity and calls the appropriate method on the provided Callback.

public static boolean handleActivityResult(Context context, PendingCall appCall, int requestCode, Intent data, Callback callback)
パラメーター説明
contextThe Context that is handling the activity result
appCallAn PendingCall containing the call ID and original Intent used to launch the dialog
requestCodeThe request code for the activity result
dataThe result Intent
callbackA callback to call after parsing the results
Returns
True if the activity result was handled, false if not
canPresentShareDialog(Context, ShareDialogFeature)

Determines whether the version of the Facebook application installed on the user's device is recent enough to support specific features of the native Share dialog, which in turn may be used to determine which UI, etc., to present to the user.

public static boolean canPresentShareDialog(Context context, ShareDialogFeature features)
パラメーター説明
contextThe calling Context
featuresZero or more features to check for; FacebookDialog.ShareDialogFeature.SHARE_DIALOG is implicitly checked if not explicitly specified
Returns
True if all of the specified features are supported by the currently installed version of the Facebook application; false if any of the features are not supported
canPresentOpenGraphActionDialog(Context, OpenGraphActionDialogFeature)

Determines whether the version of the Facebook application installed on the user's device is recent enough to support specific features of the native Open Graph action dialog, which in turn may be used to determine which UI, etc., to present to the user.

public static boolean canPresentOpenGraphActionDialog(Context context, OpenGraphActionDialogFeature features)
パラメーター説明
contextThe calling Context
featuresZero or more features to check for; FacebookDialog.OpenGraphActionDialogFeature.OG_ACTION_DIALOG is implicitly checked if not explicitly specified
Returns
True if all of the specified features are supported by the currently installed version of the Facebook application; false if any of the features are not supported
インスタンスメソッド
present()

Launches an activity in the Facebook application to present the desired dialog. This method returns a PendingCall that contains a unique ID associated with this call to the Facebook application. In general, a calling Activity should use UiLifecycleHelper to handle incoming activity results, in order to ensure proper processing of the results from this dialog.

public PendingCall present()
Returns
A PendingCall containing the unique call ID corresponding to this call to the Facebook application
定数
COMPLETION_GESTURE_CANCEL
public static final String COMPLETION_GESTURE_CANCEL