Highlighted

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

Explorer ,
May 22, 2014

Copy link to clipboard

Copied

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!

TOPICS
Development

Views

751

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

Explorer ,
May 22, 2014

Copy link to clipboard

Copied

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!

TOPICS
Development

Views

752

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 22, 2014 0
Enthusiast ,
May 23, 2014

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 23, 2014 0
Explorer ,
May 24, 2014

Copy link to clipboard

Copied

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

Any ideas how to fix it?


Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 24, 2014 0
Enthusiast ,
May 26, 2014

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2014 0
Engaged ,
May 29, 2014

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 29, 2014 0