Calling API methods with automated signature calculation.
Parameter
Required
Description
params
Yes
A set of key-value pairs for the called method (including the method name)
userCallback
Yes
The function that will be called after the server response
resig
No
It is required when you want to prompt the user to confirm an action through a separate preview. In all other cases, the function call by specifying only 2 parameters.
Callback function
userCallback has a following signature:
Where:
status - “ok” in case of success, “error” in case of error;
data - result object, e.g. [“565478477729”] for friends.get;
error - null in case of success, if an error is an object that contains the error code and description.