public static class FacebookDialog.OpenGraphActionDialogBuilder extends Object
FacebookDialog.canPresentOpenGraphActionDialog(android.content.Context,
com.facebook.widget.FacebookDialog.OpenGraphActionDialogFeature...)
indicates the capability is available.Modifier and Type | Field and Description |
---|---|
protected Activity |
activity |
protected FacebookDialog.PendingCall |
appCall |
protected String |
applicationId |
protected String |
applicationName |
protected Fragment |
fragment |
protected HashMap<String,File> |
imageAttachmentFiles |
protected HashMap<String,Bitmap> |
imageAttachments |
Constructor and Description |
---|
FacebookDialog.OpenGraphActionDialogBuilder(Activity activity,
OpenGraphAction action,
String previewPropertyName)
Constructor.
|
FacebookDialog.OpenGraphActionDialogBuilder(Activity activity,
OpenGraphAction action,
String actionType,
String previewPropertyName)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected CONCRETE |
addImageAttachment(String imageName,
Bitmap bitmap) |
protected CONCRETE |
addImageAttachment(String imageName,
File attachment) |
protected List<String> |
addImageAttachmentFiles(Collection<File> bitmapFiles) |
protected List<String> |
addImageAttachments(Collection<Bitmap> bitmaps) |
FacebookDialog |
build()
Constructs a FacebookDialog with an Intent that is correctly populated to present the dialog within
the Facebook application.
|
boolean |
canPresent()
Determines whether the native dialog can be presented (i.e., whether the required version of the
Facebook application is installed on the device, and whether the installed version supports all of
the parameters specified for the dialog).
|
CONCRETE |
setApplicationName(String applicationName)
Sets the name of the application to be displayed in the dialog.
|
CONCRETE |
setFragment(Fragment fragment)
Sets the fragment that should launch the dialog.
|
CONCRETE |
setRequestCode(int requestCode)
Sets the request code that will be passed to handleActivityResult when this activity completes; the
default is NativeProtocol.DIALOG_REQUEST_CODE.
|
protected final Activity activity
protected final String applicationId
protected final FacebookDialog.PendingCall appCall
protected Fragment fragment
protected String applicationName
@Deprecated public FacebookDialog.OpenGraphActionDialogBuilder(Activity activity, OpenGraphAction action, String actionType, String previewPropertyName)
activity
- the Activity which is presenting the native Open Graph action publish dialog;
must not be nullaction
- the Open Graph action to be published, which must contain a reference to at least one
Open Graph object with the property name specified by setPreviewPropertyName; the action
must have had its type specified via the OpenGraphAction.setType(String)
methodactionType
- the type of the Open Graph action to be published, which should be the namespace-qualified
name of the action type (e.g., "myappnamespace:myactiontype"); this will override the type
of the action passed in.previewPropertyName
- the name of a property on the Open Graph action that contains the
Open Graph object which will be displayed as a preview to the userpublic FacebookDialog.OpenGraphActionDialogBuilder(Activity activity, OpenGraphAction action, String previewPropertyName)
activity
- the Activity which is presenting the native Open Graph action publish dialog;
must not be nullaction
- the Open Graph action to be published, which must contain a reference to at least one
Open Graph object with the property name specified by setPreviewPropertyName; the action
must have had its type specified via the OpenGraphAction.setType(String)
methodpreviewPropertyName
- the name of a property on the Open Graph action that contains the
Open Graph object which will be displayed as a preview to the userpublic CONCRETE setRequestCode(int requestCode)
requestCode
- the request codepublic CONCRETE setApplicationName(String applicationName)
applicationName
- the name of the Facebook applicationpublic CONCRETE setFragment(Fragment fragment)
onActivityResult
call rather than the Activity.fragment
- the fragment that contains this controlpublic FacebookDialog build()
public boolean canPresent()
protected List<String> addImageAttachments(Collection<Bitmap> bitmaps)
protected List<String> addImageAttachmentFiles(Collection<File> bitmapFiles)