Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15112] iOS: Facebook module logout function does not log out user properly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2014-04-21T20:31:34.000+0000
Affected Version/sRelease 3.1.1, Release 3.1.2
Fix Version/s2014 Sprint 08, 2014 Sprint 08 SDK
ComponentsiOS
LabelssupportTeam
ReporterRupesh Sharma
AssigneeSabil Rahim
Created2013-09-10T10:25:46.000+0000
Updated2017-03-22T18:18:10.000+0000

Description

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()

Comments

  1. Mark Mokryn 2013-09-24

    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.
  2. Sabil Rahim 2014-04-21

    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.
  3. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source