public function addDialogListener(listener:Function):GVTwitterDispatcher
Convenience method that adds an event listener for when a Twitter dialog request is completed. This listener will be a weak reference and automatically removed after dispatch. For backwards compatibility, GoViral.goViral
will also dispatch the related event.
The listener parameter should take the form of function(e:GVTwitterEvent) {}
. You may check the value of e.type
which will be either GVTwitterEvent.TW_DIALOG_FINISHED
if the dialog completed successfully, GVTwitterEvent.TW_DIALOG_CANCELED
if the dialog was canceled, or GVTwitterEvent.TW_DIALOG_FAILED
if the dialog was not displayed successfully.
Parameters
| listener:Function — the event listener function, should take GVFacebookEvent as a parameter
|
ReturnsSee also
Event Object Type: com.milkmangames.nativeextensions.events.GVTwitterEvent
Dispatched when a Twitter Dialog was cancelled
Event Object Type: com.milkmangames.nativeextensions.events.GVTwitterEvent
Dispatched when a Twitter Dialog has Failed
Event Object Type: com.milkmangames.nativeextensions.events.GVTwitterEvent
Dispatched when a Twitter Dialog is Finished