Packagecom.distriqt.extension.facebook.share
Interfacepublic interface ShareDialog extends flash.events.IEventDispatcher

Provides functionality to share content via the Facebook Share Dialog



Public Methods
 MethodDefined By
  
canShow(type:String):Boolean
Indicates whether it is possible to show the dialog for specified ShareContent.
ShareDialog
  
show(content:Object):Boolean
Shows a share dialog using the provided content.
ShareDialog
Events
 Event Summary Defined By
   Dispatched when the user cancelled a share dialog ShareDialog
   Dispatched when the Facebook share dialog has completed successfully.ShareDialog
   Dispatched when an error occurred posting from a dialog errorMessage will contain details on the error that occurred.ShareDialog
Method Detail
canShow()method
public function canShow(type:String):Boolean

Indicates whether it is possible to show the dialog for specified ShareContent.

Parameters

type:String — The TYPE definition on the builder you wish to check eg ShareLinkContentBuilder.TYPE

Returns
Booleantrue if the dialog type can be shown and false otherwise
show()method 
public function show(content:Object):Boolean

Shows a share dialog using the provided content. You must create the content using one of the builders:

Parameters

content:Object — Share content created using one of the builders

Returns
Booleantrue if the dialog will be displayed and false if it is not available

Example
Share a link using the ShareLinkContentBuilder
         var builder:ShareLinkContentBuilder = new ShareLinkContentBuilder()
             .setContentUrl("https://airnativeextensions.com/extension/com.distriqt.FacebookAPI");
                  var success:Boolean = FacebookShare.instance.shareDialog.show( builder.build() );
         
Event Detail
facebook_share_dialog_cancel Event
Event Object Type: com.distriqt.extension.facebook.share.events.ShareDialogEvent
ShareDialogEvent.type property = com.distriqt.extension.facebook.share.events.ShareDialogEvent.CANCEL

Dispatched when the user cancelled a share dialog
facebook_share_dialog_complete Event  
Event Object Type: com.distriqt.extension.facebook.share.events.ShareDialogEvent
ShareDialogEvent.type property = com.distriqt.extension.facebook.share.events.ShareDialogEvent.COMPLETE

Dispatched when the Facebook share dialog has completed successfully.

postId will contain the id of the post created.

facebook_share_dialog_error Event  
Event Object Type: com.distriqt.extension.facebook.share.events.ShareDialogEvent
ShareDialogEvent.type property = com.distriqt.extension.facebook.share.events.ShareDialogEvent.ERROR

Dispatched when an error occurred posting from a dialog

errorMessage will contain details on the error that occurred.