Facebook 页面 iframe 选项卡 - 表单未出现

发布于 2024-12-09 14:19:59 字数 363 浏览 7 评论 0原文

我在 Facebook 页面上有一个表格。在这里看到: http://on.fb.me/ocsqMR

这是一个 iframe 选项卡,但形式底部没有渲染。当使用IE8或9时,该表单不会出现。当使用 chrome、firefox 或 safari 时,确实会出现该表单。使用 Chrome,当我检查元素时我可以看到它,但它在那里但不可见。

http://imgcoop.com/ip-images/1318426054.png

有想法吗?

I have a form on a facebook page. seen here: http://on.fb.me/ocsqMR

It is an iframe tab but the form at the bottom is not rendering. When using IE8 or 9, the form does not appear. When using chrome, firefox, or safari, the form does appear. Using chrome I can see it when I do inspect element but it's there but not visible.

http://imgcoop.com/ip-images/1318426054.png

Ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

〆一缕阳光ご 2024-12-16 14:19:59

查看页面的源代码,您需要进行一些更改和添加。

确保为页面声明 DOCTYPE。
http://www.w3.org/QA/2002/04 /valid-dtd-list.html

接下来,从 body 标记中删除 onLoad 属性:

<Body onLoad="FB.Canvas.setSize({width: 515, height: 1350})"><Div id="fb-root"></div>`

此外,您还需要更新此代码:
确保您使用的是 https://developers.facebook.com/apps 中的应用 ID应用程序。
您还需要确保 OAuth 属性在您的调用中。

<Script src="http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<Script type="text/javascript">
FB.init({
appId: FB_APP_ID,Status: true,Cookie: true,Xfbml: true
});
window.fbAsyncInit = function().{
fb.canvas.setautoresize();
}
</Script>

下面是它的外观示例:

<script type="text/javascript">
  window.fbAsyncInit = function() {
    FB.init({appId: 'PUT THE APP ID FROM https://developers.facebook.com/apps HERE',
 status: true, cookie: true,
             xfbml: true, oauth: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>
<script type="text/javascript">
        window.fbAsyncInit = function() {
        FB.Canvas.setAutoResize();
}
</script>

Looking at the source code for your page you need to make a few changes and additions.

Make sure you declare a DOCTYPE for the page.
http://www.w3.org/QA/2002/04/valid-dtd-list.html

Next, remove the onLoad attribute from the body tag:

<Body onLoad="FB.Canvas.setSize({width: 515, height: 1350})"><Div id="fb-root"></div>`

And also, you'll need to update this code:
Make sure you're using the app ID from https://developers.facebook.com/apps for your app.
You'll also want to make sure the OAuth attribute is in your call.

<Script src="http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<Script type="text/javascript">
FB.init({
appId: FB_APP_ID,Status: true,Cookie: true,Xfbml: true
});
window.fbAsyncInit = function().{
fb.canvas.setautoresize();
}
</Script>

Here is an example of how it should look:

<script type="text/javascript">
  window.fbAsyncInit = function() {
    FB.init({appId: 'PUT THE APP ID FROM https://developers.facebook.com/apps HERE',
 status: true, cookie: true,
             xfbml: true, oauth: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>
<script type="text/javascript">
        window.fbAsyncInit = function() {
        FB.Canvas.setAutoResize();
}
</script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文