How to logout and re-login with another user

Sep 15, 2010 at 9:37 AM

Hi,

i'm using this library for connect with facebook using an WPF application, but  when for the first time i login correctly with my first login, when i logout for login with the second username, the library connect me directly with the first...

Can anyone know how to logout and re-login with an another login?

Please help me...

Tubeno

Sep 24, 2010 at 8:20 PM

Hi!

I'm facing this issue too in my WPF app. cleared all session and it doesnt seem to work at all. does anyone have an answer for this?

Sep 26, 2010 at 6:43 PM

So, i guessing no one here logs out at all?

Dec 10, 2010 at 7:08 AM

Hi,

    I am also have a problem with the session.logout().

The application correcly displays the login screen first time round but then after a logout the login screen is not shown for subsequent login atempts and the previous account is used.

I am deleting all cookies after the logout has occoured.

If the application is restarted it all works fine the fist time again.

The application I am writing is for a photobooth which will be used by multiple users.

Thanks in advance for any help.

John

 

Dec 10, 2010 at 10:52 AM

My answer won't be very usefull but maybe a little.

I had the same problem once, it was because of the connect script. Now i use:

 

    window.onload = function () {
        FB_RequireFeatures(["XFBML"], function () {
            FB.Facebook.init("<%= RWE.Core.Config.FacebookApi %>", "/xd_receiver.htm", { "reloadIfSessionStateChanged": true });
            FB_RequireFeatures(["CanvasUtil"], function () {
                FB.XdComm.Server.init("/xd_receiver.htm");
                FB.CanvasClient.startTimerToSizeToContent();
            });
        });
    };

 

Then, everything was ok until last week. So, I've look at the javascript api and saw this one was ok. The cookie was ok too even if the Master.Api still returned the first user.

As i can't find any solution on the web, I had to find something working until i find why the toolkit api do not return the same user than the javascript api and cookie. This is it:

 

     long _fid = -1;
     long _nid = -1;
     long _idOk = -1;

        var Master = ((Facebook.Web.CanvasIFrameMasterPage)this.Page.Master);
        Master.RequireLogin = true;
        Api = ((Facebook.Web.CanvasIFrameMasterPage)this.Page.Master).Api;
        try
        {
            _fid = (long)RWE.Core.web2.FacebookConnectAuthentication.UserID; //uid in cookie
            _nid = Api.Users.GetLoggedInUser(); // uid in toolkit api
            if (_fid != _nid && _fid != -1 && _fid != 0)
            {
                _idOk = _fid;
            }
            else
            {
                _idOk = _nid;
            }
        }
        catch { }
        Session["fbMe"] = Api.Users.GetInfo(_idOk); //load the correct user

 

I know, this is not what we have to do... It still has problems with 2 users on safari on ipad (cookie return 0!)