伸延: | Object |
套件: | widget |
getNativeDialogDidComplete(Bundle)
Determines whether the native dialog completed normally (without error or exception).
public static boolean getNativeDialogDidComplete(Bundle result)
參數 | 說明 |
---|---|
result | The bundle passed back to onActivityResult |
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)
參數 | 說明 |
---|---|
result | The bundle passed back to onActivityResult |
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)
參數 | 說明 |
---|---|
result | The bundle passed back to onActivityResult |
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)
參數 | 說明 |
---|---|
context | The Context that is handling the activity result |
appCall | An PendingCall containing the call ID and original Intent used to launch the dialog |
requestCode | The request code for the activity result |
data | The result Intent |
callback | A callback to call after parsing the results |
canPresentMessageDialog(Context, MessageDialogFeature)
Determines whether the version of the Facebook application installed on the user's device is recent enough to support specific features of the native Message dialog, which in turn may be used to determine which UI, etc., to present to the user.
public static boolean canPresentMessageDialog(Context context, MessageDialogFeature features)
參數 | 說明 |
---|---|
context | The calling Context |
features | Zero or more features to check for; FacebookDialog.MessageDialogFeature.MESSAGE_DIALOG is implicitly checked if not explicitly specified |
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)
參數 | 說明 |
---|---|
context | The calling Context |
features | Zero or more features to check for; FacebookDialog.OpenGraphActionDialogFeature.OG_ACTION_DIALOG is implicitly checked if not explicitly specified |
canPresentOpenGraphMessageDialog(Context, OpenGraphMessageDialogFeature)
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 Message dialog, which in turn may be used to determine which UI, etc., to present to the user.
public static boolean canPresentOpenGraphMessageDialog(Context context, OpenGraphMessageDialogFeature features)
參數 | 說明 |
---|---|
context | The calling Context |
features | Zero or more features to check for; FacebookDialog.OpenGraphMessageDialogFeature.OG_MESSAGE_DIALOG is implicitly checked if not explicitly specified |
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()
COMPLETION_GESTURE_CANCEL
public static final String COMPLETION_GESTURE_CANCEL
RESULT_ARGS_DIALOG_COMPLETE_KEY
public static final String RESULT_ARGS_DIALOG_COMPLETE_KEY
RESULT_ARGS_DIALOG_COMPLETION_GESTURE_KEY
public static final String RESULT_ARGS_DIALOG_COMPLETION_GESTURE_KEY
RESULT_ARGS_DIALOG_COMPLETION_ID_KEY
public static final String RESULT_ARGS_DIALOG_COMPLETION_ID_KEY