• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Explorer ,
May 22, 2014 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

858

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
community guidelines
Enthusiast ,
May 23, 2014 May 23, 2014

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Explorer ,
May 24, 2014 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?


Votes

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
community guidelines
Enthusiast ,
May 26, 2014 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.

Votes

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
community guidelines
Engaged ,
May 29, 2014 May 29, 2014

Copy link to clipboard

Copied

LATEST

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!

Votes

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
community guidelines