Reputation: 123
I am using Facebook integration in my application. I am logging with Facebook and now I want logout from my application. Many members are asked this question but I am not getting proper solution.
Upvotes: 0
Views: 910
Reputation: 452
just add these 4 lines of codes to logout button, to clear all the cookies, so that you can successfully logout from facebook.
NSHttpCookieStorage storage = NSHttpCookieStorage.SharedStorage;
foreach (NSHttpCookie cookie in storage.Cookies)
{
if(cookie.Domain == ".facebook.com")
{
storage.DeleteCookie(cookie);
}
}
Upvotes: 1
Reputation: 43553
The Social.framework, provided with Apple iOS 6, does not require you to login, nor to logout.
The user credentials (for Facebook) are kept in the iOS settings (out of reach of the applications) so the operating system is able to log you in on demand and will log you out when you're finished. That likely occurs after you release your last instance of SLRequest
or some time afterward (e.g. caching).
Upvotes: 0