在我的网站上的Iframe中显示Facebook [英] Displaying Facebook in an Iframe on my website

查看:203
本文介绍了在我的网站上的Iframe中显示Facebook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上显示Facebook的网页?

I want to Display Facebook's Webpage on my site ?

<html>
<body>
    <iframe src="http://www.facebook.com/" name="iframe_a"></iframe>
</body>
</html>

这只是显示Facebook的一张图片,而不是实际内容。我怎么能这样做?

This just show's me an image of Facebook but not the actual content. How can i do that ?

我尝试并使用了Php然后在屏幕上回应了一些如何工作的内容但在那种情况下,我无法理解我将如何登录进入Facebook。当我登录时,它被重定向到主站点。

I tried and used Php and then echoed the content on the screen that some how worked But In that case , I cant understand How shall i Login Into facebook. When i Login it get's redirected to the Main Site.

推荐答案

这是嵌入在其页面中的代码facebook。

This is the code facebook embedded in its pages.

if (top != self) { try { if (parent != top) { throw 1; }

此代码检查它是否嵌入iframe中,其块加载其他数据而不是加载链接到的链接你可以点击图片。

This code checks if its embedded in iframe its blocks loading other data rather loads the the link to which you can click with an image.

<script type="text/javascript">
        /* <![CDATA[ */if (top != self) { 
           try { if (parent != top) { throw 1; } 
           var disallowed = ["apps.facebook.com","\/pages\/","apps.beta.facebook.com"];
            href = top.location.href.toLowerCase(); 
              for (var i = 0; i < disallowed.length; i++) {
                  if (href.indexOf(disallowed[i]) >= 0) { throw 1; } 
              } 
          } catch (e) {
             setTimeout(
                   function() {var fb_cj_img = new Image(); 
                      fb_cj_img.src = "http:\/\/error.facebook.com\/common\/scribe_endpoint.php?c=si_clickjacking&m=on\u002509&t=8183";}, 5000); 
        window.document.write("\u003cstyle>body * { display:none !important; }\u003c\/style>\u003ca href=\"#\" onclick=\"top.location.href=window.location.href\" style=\"display: block !important; padding: 10px\">\u003ci class=\"img sp_8dfqpl sx_d67a9a\" style=\"display:block !important\">\u003c\/i>Go to Facebook.com\u003c\/a>");

  /* XRCm4Hhw */ }}/* ]]> *

  </script>

这篇关于在我的网站上的Iframe中显示Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆