Skip to main content
The MessageDialog component allows users to share content through Facebook Messenger. It provides a similar interface to ShareDialog but specifically targets Messenger as the sharing destination.

Methods

canShow

Checks if the Messenger dialog can be shown with the provided content.
ShareContent
required
The content to be shared. Can be ShareLinkContent, SharePhotoContent, or ShareVideoContent.
boolean
Returns true if the Messenger dialog can be shown, false otherwise.

Example

show

Shows the Messenger share dialog with the specified content.
ShareContent
required
The content to be shared. Can be ShareLinkContent, SharePhotoContent, or ShareVideoContent.
MessageDialogResult
A promise that resolves with the share result.
boolean
Whether the user cancelled the Messenger dialog.
string
The ID of the message that was created (if successful).

Example

setShouldFailOnDataError

Sets whether or not the native message dialog should fail when it encounters a data error.
boolean
required
If true, the dialog will fail when it encounters a data error. If false, it will continue.

Example

Types

MessageDialogResult

Complete Example

Share Photo via Messenger

Notes

  • The MessageDialog requires the Facebook Messenger app to be installed on the device
  • All content types supported by ShareDialog are also supported by MessageDialog
  • See the ShareContent documentation for details on content types