Error on facebook logout in android app
<p>In my <code>android</code> application, using facebook account I can login to my app, but when i am trying to logout from facebook (from application), showing error.</p>

<p>Here is my code.</p>

<pre><code>mAsyncRunner.logout(this, new RequestListener() {
        @Override
        public void onComplete(String response, Object state) {
            Log.d("Logout from Facebook", response);
            if (Boolean.parseBoolean(response) == true) {
                runOnUiThread(new Runnable() {

                    @Override
                    public void run() {
                        // make Login button visible


                    }

                });

            }
        }
</code></pre>

<p>Error</p>

<blockquote>
  <p>11-15 06:58:22.480: E/AndroidRuntime(947): FATAL EXCEPTION: Thread-98
  11-15 06:58:22.480: E/AndroidRuntime(947): java.lang.IllegalArgumentException: Invalid context argument
  11-15 06:58:22.480: E/AndroidRuntime(947):  at android.webkit.CookieSyncManager.createInstance(CookieSyncManager.java:86)
  11-15 06:58:22.480: E/AndroidRuntime(947):  at com.facebook.Utility.clearCookiesForDomain(Utility.java:370)
  11-15 06:58:22.480: E/AndroidRuntime(947):  at com.facebook.Utility.clearFacebookCookies(Utility.java:394)
  11-15 06:58:22.480: E/AndroidRuntime(947):  at com.facebook.Session.closeAndClearTokenInformation(Session.java:673)
  11-15 06:58:22.480: E/AndroidRuntime(947):  at com.facebook.android.Facebook.logoutImpl(Facebook.java:652)
  11-15 06:58:22.480: E/AndroidRuntime(947):  at com.facebook.android.AsyncFacebookRunner$1.run(AsyncFacebookRunner.java:86)</p>
</blockquote>

<p>In <code>Utility.java</code> this is to work around a bug where CookieManager may fail to instantiate if <code>CookieSyncManager</code> has never been created.</p>

<pre><code>CookieSyncManager syncManager = CookieSyncManager.createInstance(context);  
</code></pre>

<p>Please suggest any solution for this...</p>
