Description
After the Facebook module logout function is called and then after when try to login again it shows up with screen saying that 'You have already authorized app' though it should show login screen again.
Test Case
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var fb = require('facebook');
fb.appid = '';
fb.permissions = ['read_friendlists','read_requests','read_stream'];
fb.addEventListener('login', function(e) {
if (e.success) {
alert('Logged in');
}
});
fb.addEventListener('logout', function(e) {
alert('Logged out');
alert('Is logged in : '+fb.loggedIn);
});
win.add(fb.createLoginButton({
top : 50,
style : fb.BUTTON_STYLE_WIDE
}));
var logoutbutton=Ti.UI.createButton({
title:'LogOut'
});
logoutbutton.addEventListener('click',function(){
fb.logout();
});
win.add(logoutbutton);
win.open()
This is standard behavior on iOS: if the user entered her credentials (in the iOS settings, or in the FB app, or in the web login where a cookie is saved), the module will attempt login with that user. Try it with other FB apps on iOS and you will see similar behavior. This is why FB recommends that your mobile UI clearly shows who is the user logging in.
This is the expected behavior, the facebook SDK caches the login for a period of time, so even if you logout and try logging back in it would use the cached login response for logging in again. Marking ticket as won't fix.
Closing ticket as the issue will not fix and with reference to the above comments.