El cierre de sesión de la API de actionscript de Facebook no funciona en dispositivos móviles

I have an adobe air application. I just added facebook features in it.

My problem is that user can login and do activities properly.

Following the code that i am using for logout :

protected function logout(callback:Function=null, appOrigin:String=null):void { this.logoutCallback = callback;

        //clears cookie for mobile.
        var params:Object = {};
        params.confirm = 1;
        params.next = appOrigin;
        params.access_token = accessToken;
        var req:FacebookRequest = new FacebookRequest();

        openRequests[req] = handleLogout;
        req.call("https://m.facebook.com/logout.php", "GET" , handleRequestLoad, params);

        var so:SharedObject = SharedObject.getLocal(SO_NAME);
        so.clear();
        so.flush();

        session = null;
    }

i am passing "https://www.facebook.com/" as appOrigin

But the logout functionality is not working.

Cualquier ayuda apreciada.

preguntado el 08 de noviembre de 11 a las 11:11

what do you mean by "not working?" We probably can't help you with just this information... -

2 Respuestas

The default logout functionality seems to not be properly clearing cookies via the FacebookMobile actionscript API. The solution in comentario # 33 aquí worked for me, reproduced here. Make sure to sub in your own APP_ID:

function logout(e:MouseEvent):void {
  FacebookMobile.logout(onLogout, "https://m.facebook.com/dialog/permissions.request?app_id=APP_ID&display=touch&next=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&type=user_agent&perms=publish_stream&fbconnect=1");
}

function onLogout(result:Object):void
{
  trace("Perfect Log Out!")
}

Respondido 03 Abr '12, 10:04

I did something similar for an iOS mobile app. I just made a string, akin to the one in the previous answer and added the callback to FacebookMobile.logout().

What's interesting is that this appears to log you out of the application, but the Access Token remains the same; at least for the short time I tested it, but it did force a new login each time nonetheless.

Respondido 06 Oct 12, 21:10

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.