开发者

How can I "lock" facebook into an iFrame?

I play some of the games on facebook and I was wondering if there is a way for me to create a simple HTML file with the game in an IFRAME. Ive been t开发者_如何学Cinkering with it and can't seem to get it to display correctly and facebook breaks out of the frame after a bit.


You probably can't. In the end, there is nothing that can stop Facebook (or any site for that matter) from putting this in the top of a JavaScript file that is used on the page:

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

As a matter of fact, that's exactly what StackOverflow does to prevent it's content from being presented in an IFRAME element.

Also, it's very likely that you are violating some sort of Terms of Service, a license, or something of that nature by trying to do that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜