Clearing StageWebView cache on Air Simulator

1.1k Views Asked by At

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

There are 1 best solutions below

1
On
    // 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;