Facebook Logout无法正常工作

时间:2013-03-07 05:47:42

标签: android facebook

我开发了一款具有Facebook签名活动的应用。一切正常,但如果我点击“FACEBOOK SIGNIN”按钮,从应用程序退出后。你能告诉我这是什么问题吗? 请检查下面的代码:

public void logout(){
        try {
            facebook.logout(getApplicationContext());
        } catch (MalformedURLException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
    }

public String logout(Context context) throws MalformedURLException, IOException {
        CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(context);
        CookieManager cookieManager = CookieManager.getInstance();
        cookieManager.removeAllCookie();
        Bundle b = new Bundle();
        b.putString("method", "auth.expireSession");
        String response = request(b);
        setAccessToken(null);
        setAccessExpires(0);
        return response;
    }

0 个答案:

没有答案