Difference between revisions of "FBInstant.setSessionData"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2018.3<br/>
+
'''<translate>Available since</translate>:''' Gideros 2018.3<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
 
Sets the data associated with the individual gameplay session for the current context.
 
Sets the data associated with the individual gameplay session for the current context.
Line 9: Line 9:
 
  FBInstant.setSessionData(sessionData)
 
  FBInstant.setSessionData(sessionData)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''sessionData''': (table) <translate>An arbitrary data table, which must be less than or equal to 1000 characters when stringified.</translate> <br/>
 
'''sessionData''': (table) <translate>An arbitrary data table, which must be less than or equal to 1000 characters when stringified.</translate> <br/>
=== Examples ===
+
=== <translate>Examples</translate> ===
 
'''Example'''<br/>
 
'''Example'''<br/>
 
<source lang="lua">
 
<source lang="lua">
 
FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}})
 
FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}})
 
<br/></source>
 
<br/></source>

Revision as of 07:28, 24 August 2018

Available since: Gideros 2018.3

Description


Sets the data associated with the individual gameplay session for the current context.

This function should be called whenever the game would like to update the current session data. This session data may be used to populate a variety of payloads, such as game play webhooks.

 FBInstant.setSessionData(sessionData)

Parameters

sessionData: (table) An arbitrary data table, which must be less than or equal to 1000 characters when stringified.

Examples

Example

FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}})
<br/>