public static class FacebookDialog.OpenGraphMessageDialogBuilder extends Object
FacebookDialog.canPresentOpenGraphMessageDialog(android.content.Context,
com.facebook.widget.FacebookDialog.OpenGraphMessageDialogFeature...)
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.OpenGraphMessageDialogBuilder(Activity activity,
OpenGraphAction action,
String previewPropertyName)
Constructor.
|
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
public FacebookDialog.OpenGraphMessageDialogBuilder(Activity activity, OpenGraphAction action, String previewPropertyName)
activity
- the Activity which is presenting the native Open Graph action message dialog;
must not be nullaction
- the Open Graph action to be sent, 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)