Titanium.Facebook

submodule of Titanium
           
0.8

The top level Facebook module. The Facebook module is used for connecting your application with Facebook through Facebook Connect.

Objects

Name Description
Titanium.Facebook.LoginButton

The Login Button created by Titanium.Facebook.createLoginButton.

Methods

Name Description
addEventListener add an event listener for the instance to receive view triggered events
createLoginButton create and return an instance of Titanium.Facebook.LoginButton
execute

execute a FB API execute request

fireEvent fire a synthesized event to the views listener
hasPermission

checks the existing permission and returns true if the user has granted the requested permission

isLoggedIn

return true if the user has logged in

publishStream

execute a stream request to FB

query

execute a FQL query against the FB API

removeEventListener remove a previously added event listener
requestPermission

request a special permission from the user

Properties

Name Type Description
loggedIn boolean

return true if the user has logged in

permissions object

return a dictionary of permissions with the keys being the name of the permission and the value being a boolean of true if granted, false if not granted

session object

return the special properties of the session

userId long

the unique user id returned from Facebook. returns 0 if not logged in

Events

Name Description
login

fired at session login

Event properties

cancel

true if the user cancelled the request by closing the dialog

error

error message if success was false

sourcethe source object that fired the event
success

true if the login was successful

typethe name of the event fired
logout

fired at session logout

Event properties

cancel

true if the user cancelled the request by closing the dialog

error

error message if success was false

sourcethe source object that fired the event
success

true if the logout was successful

typethe name of the event fired