Skip to main content
Known Participant
May 22, 2014
Question

Why does this Facebook page can't be displayed within a StageWebView?

  • May 22, 2014
  • 2 replies
  • 995 views

Hi,

By trying to open the website https://www.facebook.com/nike within a StageWebView, I received the following error:

ReferenceError: Can't find variable: console at https://fbstatic-a.akamaihd.net/rsrc.php/v2/y2/r/KK4271o6DmT.js : 95 TypeError: Result of expression 'bigPipe' [undefined] is not an object.

The website stopped loading and couldn't be displayed completly.

This is the Air/AS3 code I'm using:

var webView:StageWebView = new StageWebView();

webView.stage = this.stage;

webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight);

webView.loadURL("https://www.facebook.com/nike")

How to get to load the website within StageWebView completely? (Is there a way to ignore the errors?)

I'm using Flash CS6 and Adobe Air 3.9

Thanks for any ideas!

This topic has been closed for replies.

2 replies

Projectitis
Inspiring
May 29, 2014

This has happened to me in the past.  Though I was not opening Facebook in a StageWebView - I was loading facebook profile images using a Loader.  For me it was a cross-domain permissions/security issue.  The problem is that Facebook loads a lot of content from akamaihd.net which is on a different domain to facebook.com

This is what I did to fix it - I added this line somewhere before the call to Facebook:

import flash.system.Security;


Security.loadPolicyFile('https://fbcdn-profile-a.akamaihd.net/crossdomain.xml');

You'll likely have to change the URL to this?

Security.loadPolicyFile('https://fbstatic-a.akamaihd.net/crossdomain.xml');

Hope it helps!

Lars Laborious
Legend
May 23, 2014

Have you tried the newest version of AIR? You can download it here.

blogtomAuthor
Known Participant
May 24, 2014

Yes, I just tested AIR 4 and it's not working either.

Any ideas how to fix it?


Lars Laborious
Legend
May 26, 2014

Not sure I tested your code and it works fine with me. However, I'm using Flash CC on a PC.