0
votes

I use StageWebView for Facebook authentication in my mobile game. Everything works fine except that I can never reset StageWebView cache. I remain logged into Facebook and because of that I can't test authentication with another Facebook account.

I checked "Clear data on application launch" on debug settings to no avail.

Any ideas?

1
I vaguely recall this issue. I believe StageWebView uses a system browser, which you can't clear the cache of. There was a weird way of "unauthenticating", whether clearing the browser cache on the device, or perhaps trying to login with invalid credentials. I'll post an answer if I remember the issue exactly (or find the source of the info.) - Jeff Ward
You can find related questions by searching for Facebook logout AIR - i.e. stackoverflow.com/questions/8198259/… Perhaps they're not exactly your situation. - Jeff Ward

1 Answers

0
votes
    // use the token received for the logout:
    // accessToken = getAccessTokenEvent.accessToken;


            stageWebView = new StageWebView();
            stageWebView.addEventListener(Event.COMPLETE,completa);                 

            stageWebView.stage =  FlexGlobals.topLevelApplication.stage;
            stageWebView.viewPort= new Rectangle(0,0,FlexGlobals.topLevelApplication.stage.width-10,FlexGlobals.topLevelApplication.stage.height-10);

            stageWebView.loadURL("https://m.facebook.com/logout.php?next=http://m.facebook.com&access_token="+ accessToken +"&confirm=1");

            var loginRequest:URLRequest = new URLRequest();
            loginRequest.method = URLRequestMethod.GET;