Package 

Class GamingPayload

    • Method Summary

      Modifier and Type Method Description
      static String getGameRequestID() Retrieves the Game Request ID that referred the user to the game.
      static String getPayload() Retrieves a payload sent from Facebook to this game.
      static String getTournamentId() Retrieves the tournament id sent from Facebook to this game.
      static void loadPayloadFromCloudGame(String payloadString) Retireves any Gaming Payload bundled in the start arguments for a Game running on FacebookCloud.
      static void loadPayloadFromIntent(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

        @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.

      • getTournamentId

        @Nullable() static String getTournamentId()

        Retrieves the tournament id sent from Facebook to this game.

        When a user clicks play from the tournament share post on their news feed, the tournament idwill be sent to the game via deeplink.

      • 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.