Difference between revisions of "FBInstant.setSessionData"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2018.3<br/> | + | <languages /> |
− | === Description === | + | '''<translate>Available since</translate>:''' Gideros 2018.3<br/> |
− | <br /> | + | '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> |
+ | === <translate>Description</translate> === | ||
+ | <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. | ||
− | 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.<br /> | + | 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.<br /></translate> |
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.setSessionData(sessionData) | FBInstant.setSessionData(sessionData) | ||
− | </ | + | </syntaxhighlight> |
− | === Parameters === | + | === <translate>Parameters</translate> === |
− | '''sessionData''': (table) An arbitrary data table, which must be less than or equal to 1000 characters when stringified. <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/> | ||
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}}) | FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}}) | ||
− | <br/></ | + | <br/></syntaxhighlight> |
+ | |||
+ | {{FBInstant}} |
Latest revision as of 14:29, 13 July 2023
Available since: Gideros 2018.3
Class: * Initialisation and Core
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/>
- FBInstant.canCreateShortcutAsync
- FBInstant.checkCanPlayerMatchAsync
- FBInstant.createShortcutAsync
- FBInstant.getEntryPointAsync
- FBInstant.getEntryPointData
- FBInstant.getInterstitialAdAsync
- FBInstant.getLeaderboardAsync
- FBInstant.getLocale
- FBInstant.getPlatform
- FBInstant.getRewardedVideoAsync
- FBInstant.getSDKVersion
- FBInstant.getSupportedAPIs
- FBInstant.logEvent
- FBInstant.matchPlayerAsync
- FBInstant.onPause
- FBInstant.quit
- FBInstant.setLoadingProgress
- FBInstant.setSessionData
- FBInstant.shareAsync
- FBInstant.startGameAsync
- FBInstant.switchGameAsync
- FBInstant.updateAsync