Difference between revisions of "FBInstant.player.getDataAsync"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''<translate>Available since</translate>:''' Gideros 2018.3<br/>
 
'''<translate>Available since</translate>:''' Gideros 2018.3<br/>
 +
'''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />

Revision as of 09:30, 24 August 2018

Available since: Gideros 2018.3
Class: Player

Description


Retrieve data from the designated cloud storage of the current player.

 FBInstant.player.getDataAsync(keys,callback)

Parameters

keys: (table) An array of unique keys to retrieve data for.
callback: (function) A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed.

Examples

Example

FBInstant.player.getDataAsync({"achievements","currentLife"}, function(result,error)
    if result then
		for key,value in pairs(result) do
			print(key,value)
		end
	end
end)
<br/>