实际上由于缓存问题仍然存在。我们需要在您注销时清除缓存使用下面的代码它工作正常
Titanium.Facebook.appid = "XXXXXXXXXXXXXXXXXX";
Titanium.Facebook.permissions = ['publish_stream', 'read_stream'];
var fbButton = Ti.UI.createButton({
top: 68,
width:290,
height:52,
backgroundImage:"images/login/facebook.png"
});
fbButton.addEventListener('click', function() {
if(Titanium.Facebook.loggedIn){
Titanium.Facebook.logout()
return
}
Titanium.Facebook.authorize();
});
Ti.Facebook.addEventListener('login', function(e) {
if (e.success) {
win.close()
} else if (e.error) {
alert(e.error);
} else if (e.cancelled) {
alert("Canceled");
}
});
Titanium.Facebook.addEventListener('logout', function(e) {
var url = 'https://login.facebook.com';
var client = Titanium.Network.createHTTPClient();
client.clearCookies(url);
});