Packagecom.distriqt.extension.facebookapi.games
Interfacepublic interface GameRequest extends flash.events.IEventDispatcher



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

Indicates whether it is possible to show the Game Request dialog.

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

Shows the Game Request dialog using the provided content.

You must create the content using the builder:

Parameters

content:Object — Game Request content created using the builder

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

Example
Display an Game Request dialog using the GameRequestContentBuilder
         var builder:GameRequestContentBuilder = new GameRequestContentBuilder()
             .setTitle( "Facebook API ANE Game Request" )
             .setMessage( "Come play this game with me" );
         
             var success:Boolean = FacebookAPI.service.gameRequest.show( builder.build() );
         
Event Detail
facebookapi:gamerequest:dialog:cancelled Event
Event Object Type: com.distriqt.extension.facebookapi.events.GameRequestEvent
GameRequestEvent.type property = com.distriqt.extension.facebookapi.events.GameRequestEvent.DIALOG_CANCELLED

Dispatched when the user cancelled a Game Request dialog
facebookapi:gamerequest:dialog:completed Event  
Event Object Type: com.distriqt.extension.facebookapi.events.GameRequestEvent
GameRequestEvent.type property = com.distriqt.extension.facebookapi.events.GameRequestEvent.DIALOG_COMPLETED

Dispatched when the Facebook App Invite dialog has completed successfully.

facebookapi:gamerequest:dialog:error Event  
Event Object Type: com.distriqt.extension.facebookapi.events.GameRequestEvent
GameRequestEvent.type property = com.distriqt.extension.facebookapi.events.GameRequestEvent.DIALOG_ERROR

Dispatched when an error occurred from a Game Request dialog

errorMessage will contain details on the error that occurred.