facebook/facebook-android-sdk — pull request #274 by jboutros (2012-08-15 03:22:59+00:00)
Title: Clear only facebook.com cookies when logging out

In the current version of the SDK, all cookies are cleared from the specified context when calling the SDK's logout method.

This can be problematic for applications that use a WebView or have some other reason to maintain cookie state post Facebook logout.

The Android SDK does not provide a method to delete cookies from a single domain, so here is an alternate implementation.

The changes in this pull request do the following:
* Retrieve the cookie string for the domain "facebook.com"
* Split the string to retrieve individual cookies
* Call setCookie() with each key, setting a blank value and an expiration date of 01/01/2000
* Call removeExpiredCookies()