FBInstant.context.chooseAsync

From GiderosMobile
Revision as of 10:21, 23 August 2018 by Hgy29 (talk | contribs)

Available since: Gideros 2018.3

Description


Opens a context selection dialog for the player. If the player selects an available context, the client will attempt to switch into that context, and resolve if successful. Otherwise, if the player exits the menu or the client fails to switch into the new context, this function will reject.

 FBInstant.context.chooseAsync(options,callback)

options: (table) A table specifying conditions on the contexts that should be offered. optional
'callback: (function) A function that will be called with two arguments: true when the game has switched into the context chosen by the user. Otherwise, the promise will reject (if the user cancels out of the dialog, for example) and an error code if the function failed. '