Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top