Android SDK Version

public class GameRequestDialog
extends com.facebook.internal.FacebookDialogBase<GameRequestContent,GameRequestDialog.Result>
Provides functionality to send requests in games. see https://developers.facebook.com/docs/games/requests
Nested Class Summary
Modifier and TypeClass and Description
static class GameRequestDialog.Result
Helper object for handling the result from a requests dialog
Nested classes/interfaces inherited from class com.facebook.internal.FacebookDialogBase
com.facebook.internal.FacebookDialogBase.ModeHandler
Field Summary
Fields inherited from class com.facebook.internal.FacebookDialogBase
BASE_AUTOMATIC_MODE
Constructor Summary
Constructor and Description
GameRequestDialog(Activity activity)
Constructs a new RequestDialog.
GameRequestDialog(android.app.Fragment fragment)
Constructs a new RequestDialog.
GameRequestDialog(Fragment fragment)
Constructs a new RequestDialog.
Method Summary
Modifier and TypeMethod and Description
static booleancanShow()
Indicates whether the game request dialog can be shown.
protected com.facebook.internal.AppCallcreateBaseAppCall() 
protected java.util.List<com.facebook.internal.FacebookDialogBase.ModeHandler>getOrderedModeHandlers() 
protected voidregisterCallbackImpl(com.facebook.internal.CallbackManagerImpl callbackManager, FacebookCallback<GameRequestDialog.Result> callback) 
static voidshow(Activity activity, GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity.
static voidshow(android.app.Fragment fragment, GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity.
static voidshow(Fragment fragment, GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity.
Methods inherited from class com.facebook.internal.FacebookDialogBase
canShow, canShowImpl, getActivityContext, getRequestCode, registerCallback, registerCallback, setRequestCode, show, showImpl, startActivityForResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

GameRequestDialog

public GameRequestDialog(Activity activity)
Constructs a new RequestDialog.
Parameters:
activity - Activity hosting the dialog.

GameRequestDialog

public GameRequestDialog(Fragment fragment)
Constructs a new RequestDialog.
Parameters:
fragment - android.support.v4.app.Fragment hosting the dialog.

GameRequestDialog

public GameRequestDialog(android.app.Fragment fragment)
Constructs a new RequestDialog.
Parameters:
fragment - android.app.Fragment hosting the dialog.
Method Detail

canShow

public static boolean canShow()
Indicates whether the game request dialog can be shown.
Returns:
true if the dialog can be shown

show

public static void show(Activity activity,
                        GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity. No callback will be invoked.
Parameters:
activity - Activity hosting the dialog.
gameRequestContent - Content of the request.

show

public static void show(Fragment fragment,
                        GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity. No callback will be invoked.
Parameters:
fragment - android.support.v4.app.Fragment hosting the dialog.
gameRequestContent - Content of the request.

show

public static void show(android.app.Fragment fragment,
                        GameRequestContent gameRequestContent)
Shows a GameRequestDialog to send a request, using the passed in activity. No callback will be invoked.
Parameters:
fragment - android.app.Fragment hosting the dialog.
gameRequestContent - Content of the request.

registerCallbackImpl

protected void registerCallbackImpl(com.facebook.internal.CallbackManagerImpl callbackManager,
                                    FacebookCallback<GameRequestDialog.Result> callback)
Specified by:
registerCallbackImpl in class com.facebook.internal.FacebookDialogBase<GameRequestContent,GameRequestDialog.Result>

createBaseAppCall

protected com.facebook.internal.AppCall createBaseAppCall()
Specified by:
createBaseAppCall in class com.facebook.internal.FacebookDialogBase<GameRequestContent,GameRequestDialog.Result>

getOrderedModeHandlers

protected java.util.List<com.facebook.internal.FacebookDialogBase.ModeHandler> getOrderedModeHandlers()
Specified by:
getOrderedModeHandlers in class com.facebook.internal.FacebookDialogBase<GameRequestContent,GameRequestDialog.Result>