This question is related to my other question: How to find out if a user logs out of Facebook, FB.Event.Subscribe does not work
In this question, I tried to get a callback event when users log out of Facebook. But since he does not have a suitable answer, I have to try another way. I am trying to poll to get user login status in javascript, for example:
function checkLogin()
{
alert("in");
FB.getLoginStatus(function(response) {
if (response.status == "connected") {
alert("ok - 5 seconds has passed");
} else {
alert("not ok");
}
});
t=checkLogin("timedCount()",5000);
}
The problem is that: the function returns the correct result on the first call . After that, it seems that the result is cached, and I constantly received a “connection” in response, although the user silently left another page in the browser.
, Facebook , . , ( !).
FB dev , :
FB.getLoginStatus, HTTP- www.facebook.com, . , FB.getLoginStatus , cookie, HTTP- facebook.com
, , . , Facebook .
- , ?
,