Difference between revisions of "FBInstant.createShortcutAsync"

From GiderosMobile
Line 8: Line 8:
 
  FBInstant.createShortcutAsync(callback)
 
  FBInstant.createShortcutAsync(callback)
 
</source>
 
</source>
'''callback''': (function) A function that will be called with two arguments: Will return false if createShortcutAsync was already called this session or the user is ineligible for shortcut creation and an error code if the function failed. ''''''<br/>
+
=== Parameters ===
 +
'''callback''': (function) A function that will be called with two arguments: Will return false if createShortcutAsync was already called this session or the user is ineligible for shortcut creation and an error code if the function failed. <br/>
 +
=== Examples ===
 +
'''Example'''<br/>
 +
<source lang="lua"><br />
 +
FBInstant.createShortcutAsync(function(result,error)
 +
if result then
 +
print("Created shortcut")
 +
else
 +
print("Can't create shortcut")
 +
end
 +
end)
 +
<br/></source>

Revision as of 10:40, 23 August 2018

Available since: Gideros 2018.3.1

Description


Prompts the user to create a shortcut to the game if they are eligible to Can only be called once per session.

 FBInstant.createShortcutAsync(callback)

Parameters

callback: (function) A function that will be called with two arguments: Will return false if createShortcutAsync was already called this session or the user is ineligible for shortcut creation and an error code if the function failed.

Examples

Example

<br />
FBInstant.createShortcutAsync(function(result,error)
	if result then
		print("Created shortcut")
	else
		print("Can't create shortcut")
	end
end)
<br/>