0

I have come accross the static HTML app for facebook pages that allows us to build a landing page made up of HTML, CSS and even Javascript. eg. http://www.facebook.com/divethegap?sk=app_190322544333196

Now is it possible to interact with the parent window. I'd like to change the overall background to something else if possible, preferably an image from our website.

As a test I tried $('body', window.parent.document).css('background-color', '#888');

Nothing hapenned. I can imagine many reason why facebook would limit or restrict entirely the ability to ammend the parent window, but in the case of CSS for the parent I wondered if it were possible. It would certainly brighten up the overall theme considerably.

Walrus
  • 19,801
  • 35
  • 121
  • 199
  • Facebook doesn't want apps drawing on their sandbox and is putting up a big fence in order to not let them. That's why they hide apps away inside of an iFrame hosted on a different domain. :) – DMCS Feb 01 '12 at 20:52

1 Answers1

0

It is because of cross domain access restrictions you cannot access any thing from the parent window if it is not in the same domain.

ShankarSangoli
  • 69,612
  • 13
  • 93
  • 124