Ti.Facebook.session not populated
I'm using the latest 1.5.0 from Continuous builds (Nov 27) and I'm not seeing the session object populated even when the Ti.Facebook.isLoggedIn() function returns true.
Incidentally the Ti.Facebook.userId does contain the right value for my facebook id.
here's my snippet
Ti.Facebook.addEventListener('login', function(e)
{
Ti.API.info(Ti.Facebook.session['session_key']);
Ti.API.info(Ti.Facebook.userId);
});
Ti.Facebook.setup('<app_id>','<secret>',null,function(result) {
if(Ti.Facebook.isLoggedIn()) {
Ti.API.info(Ti.Facebook.session['session_key']);
Ti.API.info(Ti.Facebook.userId);
}
});
The info are written but the value is null for the "session_key" and the correct value for "userId".
Can anybody see anything wrong or share some code on how to retrieve the session_key? I don't want to use a session proxy.
2 Answers
-
try asignning Ti.Facebook.session.session_key to a var and then showing that variable
var data = Ti.Facebook.session.session_key;
Ti.API.info(data);
-
@daniel, did you ever figure this out? I'd like to not use a proxy as well, but it appears that the "login" event never fires?? Do you have any sample code you could post that successfully uses facebook without a proxy?