![]() |
Facebook connect logout
Gidday guys
Just about implemented the php version of Facebook connect, and have a question re logging a user out when the site is set up for users that have logged in with or without FB. My method: 1. Non-FB users log in, and get a session var set when successful. Same thing with FB users - it's just that their FB id gets checked in mysql, not a username and pass like non-FB users. 2. Member-only pages now contain a logout url up the top - logout.php - this page basically kills any session data, and then redirects the user to the homepage... Code:
session_start();I have the Facebook logout url for an example session, which is... Code:
https://www.facebook.com/logout.php?next=https%3A%2F%2Fwww.mysite.com%2Fr%2Fmy_facebook_login_logic.php&access_token=AAAEZ...big_long_***_number...1. Is a user logs in with FB, also set a session var to flag that they have done this eg Code:
$_SESSION['fb'] = true;Code:
$_SESSION['fb'] = false;Code:
session_start();Thanks for your time and help. ps - just one more question re the facebook connect php code (the one you include on your login page) - do I need to include that on all my must-be-logged-in-to-see pages, or would just checking the session var that gets set when a successful login occurs be fine be fine (what I already have in place for the site)? I'm guessing you only need the include FB code on pages where you might need to access FB permitted stuff, like posting to a user's timeline etc |
| All times are GMT +1. The time now is 11:32 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.