Package | com.distriqt.extension.facebookapi.share |
Interface | public interface MessageDialog extends flash.events.IEventDispatcher |
Method | Defined By | ||
---|---|---|---|
canShow(type:String):Boolean
Indicates whether it is possible to show the dialog for ShareContent of the specified type. | MessageDialog | ||
show(content:Object):Boolean
Shows the message dialog using the provided content. | MessageDialog |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the user cancelled a message dialog | MessageDialog | |||
Dispatched when the Facebook message dialog has completed successfully. | MessageDialog | |||
Dispatched when an error occurred posting from a dialog errorMessage will contain details on the error that occurred. | MessageDialog |
canShow | () | method |
public function canShow(type:String):Boolean
Indicates whether it is possible to show the dialog for ShareContent of the specified type.
Parameters
type:String — The TYPE definition on the builder you wish to check eg ShareLinkContentBuilder.TYPE
|
Boolean — true if the dialog type can be shown and false otherwise
|
show | () | method |
public function show(content:Object):Boolean
Shows the message dialog using the provided content.
You must create the content
using one of the builders:
ShareLinkContentBuilder
Parameters
content:Object — Share content created using one of the builders
|
Boolean — true if the dialog will be displayed and false if it is not available
|
var builder:ShareLinkContentBuilder = new ShareLinkContentBuilder() .setContentTitle("FacebookAPI ANE") .setContentDescription("This link was shared using the distriqt FacebookAPI ANE" ) .setContentUrl("https://airnativeextensions.com/extension/com.distriqt.FacebookAPI"); var success:Boolean = FacebookAPI.service.messageDialog.show( builder.build() );
facebookapi:message:dialog:cancelled | Event |
com.distriqt.extension.facebookapi.events.MessageDialogEvent
com.distriqt.extension.facebookapi.events.MessageDialogEvent.DIALOG_CANCELLED
Dispatched when the user cancelled a message dialog
facebookapi:message:dialog:completed | Event |
com.distriqt.extension.facebookapi.events.MessageDialogEvent
com.distriqt.extension.facebookapi.events.MessageDialogEvent.DIALOG_COMPLETED
Dispatched when the Facebook message dialog has completed successfully.
postId
will contain the id of the post created.
facebookapi:message:dialog:error | Event |
com.distriqt.extension.facebookapi.events.MessageDialogEvent
com.distriqt.extension.facebookapi.events.MessageDialogEvent.DIALOG_ERROR
Dispatched when an error occurred posting from a dialog
errorMessage
will contain details on the error that occurred.