Logout from Facebook Programatically iOS -
i know question has been asked on lot of pages, unfortunately non of them worked me!! problem facebook use safari when logged in, when try logout app keep credentials , cookies of safari. in other words, way logout correctly open safari , logout facebook. question is, there work around way?
fbsdkloginmanager *loginmanager = [fbsdkloginmanager new]; [loginmanager logout];
i tried
[fbsdkaccesstoken setcurrentaccesstoken:nil]; [fbsdkprofile setcurrentprofile:nil];
although being called inside logout method :(
finally tried removing cookies
nshttpcookiestorage* cookies = [nshttpcookiestorage sharedhttpcookiestorage]; nsarray* facebookcookies = [cookies cookiesforurl: [nsurl urlwithstring:@"http://login.facebook.com"]]; (nshttpcookie* cookie in facebookcookies) { [cookies deletecookie:cookie]; }
no luck @ !!!!
Comments
Post a Comment