Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3272778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:51:42+00:00 2026-05-17T18:51:42+00:00

I implemented Facebook-Connect successfully and I’m able to retrieve User-Information using the Facebook Toolkit.

  • 0

I implemented Facebook-Connect successfully and I’m able to retrieve User-Information using the Facebook Toolkit. But I cant sucessfully logout.
When I press the facebook-Logout button (which automatically appears when I’m logged in, because I’m using the autologoutlink-property)

<fb:login-button autologoutlink="true"></fb:login-button>

I still have all five Facebook-Cookies:
MyApiKey
MyApiKey_ss
MyApiKey_SessionKey
MyApiKey_expires
MyApiKey_user

After I’m logged out, I’m really logged out in Facebook, because I need to login again at facebook.com but isConnected() always returns true and I can still retrieve the user Information:

var connectSession = new ConnectSession(ConfigurationManager.AppSettings["ApiKey"], ConfigurationManager.AppSettings["Secret"]);
if (connectSession.IsConnected())
{
   var api = new Api(connectSession);
   filterContext.Controller.ViewData["FBUser"] = api.Users.GetInfo();
}

First I don’t understand why I can still retrieve User Information even though I’m not logged in any more, and secondly: How I can delete this Cookies. The Following Code didn’t work:

public static void ClearFacebookCookies()
    {
        String[] shortNames = new String[] { "_user", "_session_key", "_expires", "_ss", "" };
        HttpContext currentContext = HttpContext.Current;
        if (currentContext == null)
        {
            return;
        }
        string appKey = ConfigurationManager.AppSettings["APIKey"];
        if (appKey == null)
        {
            throw new Exception("APIKey is not defined in web.config");
        }
        foreach (var name in shortNames)
        {
            string fullName = appKey + name;
            HttpCookie cookie = currentContext.Response.Cookies[fullName];
            if (cookie != null)
            {
                cookie.Value = null;
                cookie.Expires= DateTime.Now.AddDays(-1d);
            }
            HttpCookie cookieRequest = currentContext.Request.Cookies[fullName];
            if (cookieRequest != null)
            {
                cookieRequest.Value = null;
                cookieRequest.Expires = DateTime.Now.AddDays(-1d);
            }
        }
    }// end Method
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:51:43+00:00Added an answer on May 17, 2026 at 6:51 pm

    This may be a shot in the dark, but did you make sure the fb.init is placed just before the closing body tag?

    <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script>
        <script type="text/javascript">FB.init('somekey');</script>
    

    That’s caused me problems before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I managed to implement Facebook connect on my iPhone app and allow the user
Having implemented CLogClass to make decent logging I also defined macro, but it works
Has anyone successfully implemented a Java based solution that uses Microsoft SQL Server 2005
I've been using FB Connect for some time now. The code below has worked
There are some question on the StackOverflow about facebook & email, but after reading
On my site http://colnect.com I've implemented the Facebook login button and on some pages
I am developing an ASP.NET application. I implemented Facebook API in my application now
I'm building a custom CMS for my clients and i've implemented the Facebook API
Implemented the Sink Class - to receive event notifications from COM Server Event Interface
I implemented a Lucene search solution awhile back, and it got me interested in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.