Android SDK Version
  • java.lang.Object
    • com.facebook.gamingservices.GamingPayload

public class GamingPayload
extends java.lang.Object
Method Summary
Modifier and TypeMethod and Description
static java.lang.StringgetGameRequestID()
Retrieves the Game Request ID that referred the user to the game.
static java.lang.StringgetPayload()
Retrieves a payload sent from Facebook to this game.
static voidloadPayloadFromCloudGame(java.lang.String payloadString)
Retireves any Gaming Payload bundled in the start arguments for a Game running on Facebook Cloud.
static voidloadPayloadFromIntent(Intent intent)
Retrieves any Gaming Payload bundled within the Intent that launched the Game.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

getGameRequestID

public static java.lang.String getGameRequestID()
Retrieves the Game Request ID that referred the user to the game.
When a user sends a Game Request, the recipient can launch the game directly from Facebook, the resulting deeplink will provide the referring Game Request ID.
Returns:
GameRequestID if any.

getPayload

public static java.lang.String getPayload()
Retrieves a payload sent from Facebook to this game.
When a GameRequest contains the data field, it will be forwarded here as a payload.
Returns:
GameRequest payload (if any).

loadPayloadFromCloudGame

public static void loadPayloadFromCloudGame(java.lang.String payloadString)
Retireves any Gaming Payload bundled in the start arguments for a Game running on Facebook Cloud. This is called automatically by the Cloud Init handler.
Parameters:
payloadString - JSON Encoded payload.

loadPayloadFromIntent

public static void loadPayloadFromIntent(Intent intent)
Retrieves any Gaming Payload bundled within the Intent that launched the Game.
Parameters:
intent - Intent that lanched this Game.