Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIFacebookAndroid Class Reference

Inherits MOAIGlobalClass< TYPE, SUPER >.

List of all members.

Function List

  extendToken
  getExpirationDate
  getToken
  graphRequest
  init
  login
  logout
  postToFeed
  sendRequest
  sessionValid
  setExpirationDate
  setToken

Function Documentation

Extend the token if needed.


function extendToken ()
Returns:
nil

Retrieve the Facebook login token expiration date.


function getExpirationDate ()
Returns:
expirationDate ( string )

Retrieve the Facebook login token.


function getToken ()
Returns:
token ( string )

Make a request on Facebook's Graph API.


function graphRequest ( string path [, table parameters ] )
Parameters:
path ( string )
parameters ( table ) Optional.
Returns:
nil

Initialize Facebook.


function init ( string appId )
Parameters:
appId ( string ) Available in Facebook developer settings.
Returns:
nil

Prompt the user to login to Facebook.


function login ( [ table permissions ] )
Parameters:
permissions ( table ) Optional. Optional set of required permissions. See Facebook documentation for a full list. Default is nil.
Returns:
nil

Log the user out of Facebook.


function logout ()
Returns:
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 )
Parameters:
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.
Returns:
nil

Send an app request to the logged in users' friends.


function sendRequest ( [ string message ] )
Parameters:
message ( string ) Optional. The message for the request. See Facebook documentation. Default is nil.
Returns:
nil

Determine whether or not the current Facebook session is valid.


function sessionValid ()
Returns:
valid ( boolean )

Set the Facebook login token expiration date.


function setExpirationDate ( string expirationDate )
Parameters:
expirationDate ( string ) The login token expiration date. See Facebook documentation.
Returns:
nil

Set the Facebook login token.


function setToken ( string token )
Parameters:
token ( string ) The login token. See Facebook documentation.
Returns:
nil