|
Moai SDK
1.5 revision 1 (MoaiEdition)
|
Function List | |
| extendToken | |
| getExpirationDate | |
| getToken | |
| graphRequest | |
| init | |
| login | |
| logout | |
| postToFeed | |
| sendRequest | |
| sessionValid | |
| setExpirationDate | |
| setToken | |
Extends the life of an active token. Should be called on app resume/start.
function extendToken ( nil )
| ( | nil ) |
Retrieve the Facebook login token expiration date.
function getExpirationDate ( nil )
| ( | nil ) |
Retrieve the Facebook login token.
function getToken ( nil )
| ( | nil ) |
Make a request on Facebook's Graph API.
function graphRequest ( string path [, table parameters ] )
| path | ( string ) |
| parameters | ( table ) Optional. |
Initialize Facebook.
function init ( string appId )
| appId | ( string ) Available in Facebook developer settings. |
Prompt the user to login to Facebook.
function login ( [ table permissions ] )
| permissions | ( table ) Optional. Optional set of required permissions. See Facebook documentation for a full list. Default is nil. |
Log the user out of Facebook.
function logout ( nil )
| ( | nil ) |
Post a message to the logged in users' news feed.
function postToFeed ( string link, string picture, string name, string caption, string description, string message )
| link | ( string ) The URL that the post links to. See Facebook documentation. |
| picture | ( string ) The URL of an image to include in the post. See Facebook documentation. |
| name | ( string ) The name of the link. See Facebook documentation. |
| caption | ( string ) The caption of the link. See Facebook documentation. |
| description | ( string ) The description of the link. See Facebook documentation. |
| message | ( string ) The message for the post. See Facebook documentation. |
Send an app request to the logged in users' friends.
function sendRequest ( [ string message ] )
| message | ( string ) Optional. The message for the request. See Facebook documentation. Default is nil. |
Determine whether or not the current Facebook session is valid.
function sessionValid ( nil )
| ( | nil ) |
Set the Facebook login token expiration date.
function setExpirationDate ( string expirationDate )
| expirationDate | ( string ) The login token expiration date. See Facebook documentation. |
Set the Facebook login token.
function setToken ( string token )
| token | ( string ) The login token. See Facebook documentation. |