Android SDK Version
All Implemented Interfaces:
com.facebook.FacebookDialog , com.facebook.share.Sharer

@Deprecated() 
public final class MessageDialog
extends FacebookDialogBase<ShareContent, Sharer.Result> implements Sharer
Provides functionality to send content via the Facebook Message Dialog
SUPPORTED SHARE TYPES - ShareLinkContent - ShareCameraEffectContent
UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018) - ShareOpenGraphContent - SharePhotoContent - ShareVideoContent - Any other types that are not one of the four supported types listed above
Field Summary
Modifier and TypeFieldDescription
private booleanshouldFailOnDataError
Constructor Summary
ConstructorDescription
MessageDialog(Activity activity)Constructs a MessageDialog.
MessageDialog(Fragment fragment)Constructs a MessageDialog.
MessageDialog(Fragment fragment)Constructs a MessageDialog.
Method Summary
Modifier and TypeMethodDescription
booleangetShouldFailOnDataError()
voidsetShouldFailOnDataError(boolean shouldFailOnDataError)
static voidshow(Activity activity, ShareContent shareContent) Helper to show the provided com.facebook.share.model.ShareContent using the providedActivity.
static voidshow(Fragment fragment, ShareContent shareContent) Helper to show the provided com.facebook.share.model.ShareContent using the providedFragment.
static voidshow(Fragment fragment, ShareContent shareContent) Helper to show the provided com.facebook.share.model.ShareContent using the providedFragment.
static booleancanShow(Class<out ShareContent> contentType) Indicates whether it is possible to show the dialog for of the specified type.
Methods inherited from class com.facebook.internal.FacebookDialogBase
canShow, getRequestCode, registerCallback, show
Methods inherited from class com.facebook.share.Sharer
getShouldFailOnDataError, setShouldFailOnDataError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

MessageDialog

MessageDialog(Activity activity)
Constructs a MessageDialog.
Parameters:
activity - Activity to use to send the provided content.

MessageDialog

MessageDialog(Fragment fragment)
Constructs a MessageDialog.
Parameters:
fragment - androidx.fragment.app.Fragment to use to send the provided content.

MessageDialog

MessageDialog(Fragment fragment)
Constructs a MessageDialog.
Parameters:
fragment - android.app.Fragment to use to send the provided content.
Method Detail

getShouldFailOnDataError

 boolean getShouldFailOnDataError()

setShouldFailOnDataError

 void setShouldFailOnDataError(boolean shouldFailOnDataError)

show

 static void show(Activity activity, ShareContent shareContent)
Helper to show the provided com.facebook.share.model.ShareContent using the providedActivity. No callback will be invoked.
Parameters:
activity - Activity to use to send the provided content
shareContent - Content to send

show

 static void show(Fragment fragment, ShareContent shareContent)
Helper to show the provided com.facebook.share.model.ShareContent using the providedFragment. No callback will be invoked.
Parameters:
fragment - androidx.fragment.app.
shareContent - Content to send

show

 static void show(Fragment fragment, ShareContent shareContent)
Helper to show the provided com.facebook.share.model.ShareContent using the providedFragment. No callback will be invoked.
Parameters:
fragment - android.app.
shareContent - Content to send

canShow

 static boolean canShow(Class<out ShareContent> contentType)
Indicates whether it is possible to show the dialog for of the specified type.
Parameters:
contentType - Class of the intended com.facebook.share.model.ShareContent to send.