I have a facebook app and a user logs in and uses it. Simple.
Problem: If the user logs out then another user logs in on same pc, the previous users details are loaded.
I cannot log them out of facebook as the user is in my canvas app.
I use:
require_once '/home/public_html/pages/social_login/fb_lib/facebook.php';
$facebook = new Facebook(array(
'appId' => '__app_ID__',
'secret' => '__secret__',
'cookie' => true
));
$fb_user = $facebook->api('/me');
print_r($fb_user); die;
This will show the person who is actually logged in at the top in Facebooks header – but the array shows the previous user.
How can I destroy the previous user details without having the user log in and out again?
Try within the facebook sdk:
$facebook->destroySession();– on user logout 🙂let me know if that works 🙂