function CFacebook.Listener( event )
local self = g.m_facebook
if ( “session” == event.type ) then
print( "FB Listener - Session - ", tostring(event.response) )
--options are: “login”, “loginFailed”, “loginCancelled”, or “logout”
if ( “login” == event.phase ) then
print(“Facebook Login”, event.token, event.expiration)
g.MiscData.ConnectToFacebook = true
CLog.LogEvent(“Connected”, { Type = “Facebook” } )
self.m_accessToken = event.token
self.m_expiration = event.expiration
self.IsConnected = true
self:RefreshFacebookIcons()
else
print(“Facebook Logout”)
self:Logout()
g.MiscData.ConnectToFacebook = false
end
else
print( "FB Listener - “,tostring(event.type),” - ", tostring(event.response) )
end
end
CFacebook.Logout is here:
function CFacebook:Logout()
cFacebook.logout()
self.IsConnected = false
self:RefreshFacebookIcons()
g.MiscData.ConnectToFacebook = false
end
If I add the following to lines:
print( "isError: " … tostring( event.isError ) )
print( "didComplete: " … tostring( event.didComplete ) )
I get:
isError: false
didComplete: true
for the connect and dialog calls.