public class FacebookDialog extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
FacebookDialog.Callback
Defines a callback interface that will be called when the user completes interacting with a Facebook
dialog, or if an error occurs.
|
static class |
FacebookDialog.OpenGraphActionDialogBuilder
Provides a builder which can construct a FacebookDialog instance suitable for presenting the native
Open Graph action publish dialog.
|
static class |
FacebookDialog.OpenGraphActionDialogFeature
Defines a set of features that may be supported by the native Open Graph action dialog exposed by the Facebook
application.
|
static class |
FacebookDialog.PendingCall
Encapsulates information about a call being made to the Facebook application for Android.
|
static class |
FacebookDialog.ShareDialogBuilder
Provides a builder which can construct a FacebookDialog instance suitable for presenting the native
Share dialog.
|
static class |
FacebookDialog.ShareDialogFeature
Defines a set of features that may be supported by the native Share dialog exposed by the Facebook application.
|
Modifier and Type | Field and Description |
---|---|
static String |
COMPLETION_GESTURE_CANCEL |
Modifier and Type | Method and Description |
---|---|
static boolean |
canPresentOpenGraphActionDialog(android.content.Context context,
FacebookDialog.OpenGraphActionDialogFeature... features)
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.
|
static boolean |
canPresentShareDialog(android.content.Context context,
FacebookDialog.ShareDialogFeature... features)
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.
|
static String |
getNativeDialogCompletionGesture(android.os.Bundle result)
Returns the gesture with which the user completed the native dialog.
|
static boolean |
getNativeDialogDidComplete(android.os.Bundle result)
Determines whether the native dialog completed normally (without error or exception).
|
static String |
getNativeDialogPostId(android.os.Bundle result)
Returns the id of the published post.
|
static boolean |
handleActivityResult(android.content.Context context,
FacebookDialog.PendingCall appCall,
int requestCode,
android.content.Intent data,
FacebookDialog.Callback callback)
Parses the results of a dialog activity and calls the appropriate method on the provided Callback.
|
FacebookDialog.PendingCall |
present()
Launches an activity in the Facebook application to present the desired dialog.
|
public static final String COMPLETION_GESTURE_CANCEL
public static boolean getNativeDialogDidComplete(android.os.Bundle result)
result
- the bundle passed back to onActivityResultpublic static String getNativeDialogCompletionGesture(android.os.Bundle result)
result
- the bundle passed back to onActivityResultpublic static String getNativeDialogPostId(android.os.Bundle result)
result
- the bundle passed back to onActivityResultpublic FacebookDialog.PendingCall present()
public static boolean handleActivityResult(android.content.Context context, FacebookDialog.PendingCall appCall, int requestCode, android.content.Intent data, FacebookDialog.Callback callback)
context
- the Context that is handling the activity resultappCall
- an PendingCall containing the call ID and original Intent used to launch the dialogrequestCode
- the request code for the activity resultdata
- the result Intentcallback
- a callback to call after parsing the resultspublic static boolean canPresentShareDialog(android.content.Context context, FacebookDialog.ShareDialogFeature... features)
context
- the calling Contextfeatures
- zero or more features to check for; FacebookDialog.ShareDialogFeature.SHARE_DIALOG
is implicitly checked
if not explicitly specifiedpublic static boolean canPresentOpenGraphActionDialog(android.content.Context context, FacebookDialog.OpenGraphActionDialogFeature... features)
context
- the calling Contextfeatures
- zero or more features to check for; FacebookDialog.OpenGraphActionDialogFeature.OG_ACTION_DIALOG
is implicitly
checked if not explicitly specifiedCopyright © 2014. All rights reserved.