From 0a8ba846394c3c3d77010216184cedffd59e90b5 Mon Sep 17 00:00:00 2001 From: Robin Wenglewski Date: Wed, 13 Feb 2013 18:04:27 +0100 Subject: [PATCH] use response.status to check whether the user is connected --- index.html | 4 ++-- list.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index e2c6ea4..e8e54ae 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ FB.init({appId: '194478650562619', cookie: true}); FB.getLoginStatus(function(response) { - if (response.session) { + if (response.status === "connected") { init(); } else { // no user session available, someone you dont know @@ -36,7 +36,7 @@ function login() { FB.login(function(response) { - if (response.session) { + if (response.status === "connected") { init(); } else { alert('Login Failed!'); diff --git a/list.html b/list.html index 2135e8f..6b0173e 100644 --- a/list.html +++ b/list.html @@ -26,7 +26,7 @@ FB.init({appId: '194478650562619', cookie: true}); FB.getLoginStatus(function(response) { - if (response.session) { + if (response.status === "connected") { init(); } else { // no user session available, someone you dont know @@ -36,7 +36,7 @@ function login() { FB.login(function(response) { - if (response.session) { + if (response.status === "connected") { init(); } else { alert('Login Failed!');