public static class FacebookDialog.ShareDialogBuilder extends Object
FacebookDialog.canPresentShareDialog(android.content.Context,
com.facebook.widget.FacebookDialog.ShareDialogFeature...)
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.ShareDialogBuilder(Activity activity)
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.ShareDialogBuilder(Activity activity)
activity
- the Activity which is presenting the native Share dialog; must not be nullpublic 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)