Facebook 网站的 Likebox 脚本
我已使用为 Likebox 提供的脚本为我的客户 Confluence 系统创建用户宏。
<script src="http://connect.facebook.net/en_US/all.js#x fbml=1"></script>`
<fb:like-box
href="http://www.facebook.com/pages/Canada-YMCA-Federal-Government-Youth-Internships/215740255103118"
show_faces="true" stream="true"
header="true">
</fb:like-box>
我的客户计划升级到 Confluence 4.0。 Connfluence 4.0 对宏进行了大量更改,并使用 xhtml 而不是 wiki 标记。我已将自己的 Confluence 版本升级到 4.0,但在插入 facebook-likebox 宏的页面上出现以下错误:
渲染宏“facebook-likebox”时出错:无法转换 HTML 宏模板以进行显示。
嵌套消息:无法解析 XML 内容。第 11 行第 161 列有问题。
解析器消息:[row,col {unknown-source}] 处未声明的命名空间前缀“fb”:[11,161]
这是脚本 此处 和 html 字符实体。
当我导航到 http://connect.facebook.net/en_US/all.js# x 我看到了 JavaScript。这是 Likebox 的完整脚本吗?如果我有完整的脚本,我也许可以进行必要的更改。
我可以得到一些反馈吗?
I have used the script provided for the likebox to create a user macro for my clients Confluence system.
<script src="http://connect.facebook.net/en_US/all.js#x fbml=1"></script>`
<fb:like-box
href="http://www.facebook.com/pages/Canada-YMCA-Federal-Government-Youth-Internships/215740255103118"
show_faces="true" stream="true"
header="true">
</fb:like-box>
My client is planning on upgrading to Confluence 4.0. Connfluence 4.0 has made a lot of changes with their macros and uses xhtml instead of wiki markup. I have upgraded my own version of Confluence to 4.0 and I am getting the following error on the page that I inserted the facebook-likebox macro on:
Error rendering macro 'facebook-likebox' : Failed to transform the HTML macro template for display.
Nested message: The XML content could not be parsed. There is a problem at line 11, column 161.
Parser message: Undeclared namespace prefix "fb" at [row,col {unknown-source}]: [11,161]
It is a problem with the script here and the html character entities.
When I navigate to http://connect.facebook.net/en_US/all.js#x I see the JavaScript. Is this the full script for the likebox? If I have the the full script I may be able to make the necessary changes.
Could I get some feedback on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不熟悉 Confluence,因此不确定如何在您的设置中更改此设置(也许其他人会知道),但您需要告诉 Confluence 有关
fb
和og
Facebook 用于社交插件中的 XFBML 元素和一些 Open Graph 元标记的前缀在标准 HTML 页面中,
如果您无法让它与您的配置很好地配合,则可以使用此前缀,大多数 Facebook 社交插件也有HTML5 或 iframe 版本不需要使用“fb”标签(例如 Javascript SDK 替换为 Like Box iframe 的
' 标签)I'm not familiar with Confluence, so not sure how to change this in your setup (maybe someone else will know) but you need to tell Confluence about the
fb
andog
prefixes Facebook uses for the XFBML elements in the Social Plugins and some of the Open Graph meta tagsIn a standard HTML page this is done with
if you can't get this to play nicely with your configuration, most of the Facebook social plugins also have a HTML5 or iframe version which won't require use of 'fb' tags (like the
<fb:like-box>
' tag which the Javascript SDK replaces with the Like Box iframe)