views:

814

answers:

1

Does anyone know of a solution for this that i may be able to purchase?

Ok Well facebook no longer allows you to embed into an IFrame and my company wants to have facebook show up on our application which we do by creating a Iframe and embedding. But on Feb 5th facebook took away that ability. So I am looking for someone who has worked around this sollution but no matter what the sollution has to embed within an IFrame...

+4  A: 
<iframe src="http://www.facebook.com/" />

I have not tested, but I suspect Facebook might be using some JavaScript like this to break out of frames:

if (top.location != location) {
    top.location.href = document.location.href ;
}

Unfortunately there is nothing you can do about this, except if you were to proxy the entire Facebook site on-the-fly and filter out this JavaScript, which would most likely break other things. Facebook, and many other sites, implement this trick because frames are often used only for malicious purposes (i.e. framing another website with illegitimate ads or scamming).

Edit: I see from your comment that you say this works at the moment. As I explain above, this is really under Facebook's control, unfortunately. If they choose to add the little bit of JavaScript to break out of frames, you can't stop that from running.

Ricket
Nicely done. (15 chars)
ceejayoz
Hmmm ok that seems to work again today but on Feb 5th Facebook took away all ability to use an IFrame... Seems they granted the masses the ability to do it again?shall theytake it away?
Rico
Well Basically on Feb 5 they had put a black screen over the front of their site if you had it embedded...Thanks for your help i should have tried it again today before asking..
Rico