Facebook Multiple Accounts ...
Using the Ti.Facebook.LoginButton a user can login and logout of a single Facebook account all day long … Login/Logout … Login/Logout …
How can I get the user to login to a different Facebook account?
Clicking the Login button just logs the user into the same Facebook account!
Are there some settings somewhere that can be reset/deleted to trigger the login screen?
5 Answers
-
no answer ??
-
put these 2 lines in your logout listener:
var client = Ti.Network.createHTTPClient(); client.clearCookies('https://login.facebook.com');
so something like this:
Ti.Facebook.addEventListener('logout', function(e) { var client = Ti.Network.createHTTPClient(); client.clearCookies('https://login.facebook.com'); });
works for me. i get the a blank login dialog so i can enter new login creds.
-
… the facebook login and logout is a pain.
I handle like this ( is not the better way, but It works ).
global scope
function actualizaFacebookStatus() { } Titanium.Facebook.addEventListener('login', actualizaFacebookStatus); Titanium.Facebook.addEventListener('logout', actualizaFacebookStatus);
login button
Titanium.Facebook.addEventListener('login', function(g) { if (g.success) { Titanium.App.Properties.setString("facebook",g.data.name); e.rowData.title ='Vinculado a : '+ g.data.name; } else if (g.error) { Titanium.UI.createAlertDialog({title:'Cazabaches DF', message: g.error, buttonNames:['Aceptar']}).show(); } else if (g.cancelled) { } }); Titanium.Facebook.authorize();
logout button
Titanium.Facebook.addEventListener('logout', function(g) { e.rowData.title = 'Agregar Facebook'; Titanium.App.Properties.setString("facebook",''); setTimeout(hideIndicator,1500); }); Titanium.Facebook.logout();
I hope this code could you help.
-
This code
Ti.Facebook.addEventListener('logout', function(e) { var client = Ti.Network.createHTTPClient(); client.clearCookies('https://login.facebook.com'); });
does not clear cookies in iPhone app. How to login to app using new facebook account.?
-
Any update on this?