就像盒子代码不起作用

发布于 2024-12-27 18:25:05 字数 1035 浏览 5 评论 0原文

页面: http://www.facebook.com/Travel.by.Design

代码:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/travel.by.design" width="292" show_faces="true" stream="true" header="false" css="<?php bloginfo('stylesheet_directory'); ?>/fbstyle.css?1"></fb:like-box>

网站:http://waldhaus.com

在同一个网站上,我们安装了更多 Like Boxes,它们都使用相同的代码(只是不同的 URL)。所以我认为它一定与特定的 URL 其他代码有关

,相同的网站可以工作:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/farmeadow" width="292" show_faces="true" stream="true" header="false" css="<?php bloginfo('stylesheet_directory'); ?>/fbstyle.css?1"></fb:like-box>

Page: http://www.facebook.com/Travel.by.Design

Code:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/travel.by.design" width="292" show_faces="true" stream="true" header="false" css="<?php bloginfo('stylesheet_directory'); ?>/fbstyle.css?1"></fb:like-box>

website: http://waldhaus.com

On same website we have more Like Boxes installed and they all work with same code ( just different URL's). So I assume it must have to do with specific URL

other code, same website works:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/farmeadow" width="292" show_faces="true" stream="true" header="false" css="<?php bloginfo('stylesheet_directory'); ?>/fbstyle.css?1"></fb:like-box>

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

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

发布评论

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

评论(1

兲鉂ぱ嘚淚 2025-01-03 18:25:05

您有 8 个不同的 div 元素,其 idfb-root
浏览器无法决定使用哪一个。您只需要页面上带有 fb-rootdiv 之一。

您应该始终任何元素的id属性中拥有唯一的值。

正如您在上面的评论中所述,您收到的错误是 -

无法检索指定页面的 ID。请验证是否正确
href 已传入。

浏览器不知道要锁定哪个 fb-root 元素。

You have 8 different div elements with an id of fb-root.
The browser can not decide which one to use. You only need one of div with fb-root on your page.

You should always have unique values in the id property of any element.

As you have stated from the comments above, the error you are getting is -

Could not retrieve id for the specified page. Please verify correct
href was passed in.

The browser doesn't know what fb-root element to latch onto.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文