-
public class GamingPayload
-
-
Method Summary
Modifier and Type Method Description static StringgetGameRequestID()Retrieves the Game Request ID that referred the user to the game. static StringgetPayload()Retrieves a payload sent from Facebook to this game. static voidloadPayloadFromCloudGame(String payloadString)Retireves any Gaming Payload bundled in the start arguments for a Game running on FacebookCloud. static voidloadPayloadFromIntent(Intent intent)Retrieves any Gaming Payload bundled within the Intent that launched the Game. -
-
Method Detail
-
getGameRequestID
@Nullable() static 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.
-
getPayload
@Nullable() static 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.
-
loadPayloadFromCloudGame
static void loadPayloadFromCloudGame(String payloadString)
Retireves any Gaming Payload bundled in the start arguments for a Game running on FacebookCloud. This is called automatically by the Cloud Init handler.
- Parameters:
payloadString- JSON Encoded payload.
-
loadPayloadFromIntent
static void loadPayloadFromIntent(Intent intent)
Retrieves any Gaming Payload bundled within the Intent that launched the Game.
- Parameters:
intent- Intent that lanched this Game.
-
-
-
-