Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
facebook:isSessionValid() is deprecated, There is a alternative solution for FB V3 SDK? - Gideros Forum

facebook:isSessionValid() is deprecated, There is a alternative solution for FB V3 SDK?

nelinhonelinho Member
edited May 2014 in Plugins
I'm facing some issues with facebook plugin.
A few time ago, i used to use facebook:isSessionValid() to verify if is logged in, but now it doesn't work anymore.

The facebook V3 SDK is very different and i found a code snipet in java that support this question.

public boolean isLoggedIn() {
Session session = Session.getActiveSession();
if (session != null && session.isOpened()) {
return true;
} else {
return false;
}
}

There is already a properly solution in LUA for this issue?

thx in advance

Comments

  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    @nelinho yes session management is now done internally in SDK
    What you can do is to set a variable, something like:
    --set default value
    facebook._session = false
    facebook:addEventListener(Event.LOGIN_COMPLETE, function()
        facebook._session = true
    end)
    function facebook:isSessionValid()
        return self._session
    end
    facebook:login(key, permissions)
  • nelinhonelinho Member
    thanks a lot, I'll try!
Sign In or Register to comment.