如何使此代码适用于自定义"Facebook Like Box" [英] How can I make this code work for custom 'Facebook Like Box'

查看:78
本文介绍了如何使此代码适用于自定义"Facebook Like Box"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了一个带有自定义'Facebook Like Box'的演示的教程;在该演示中效果很好.我抓取了代码,然后通过 https://graph.facebook.com/插入了我页面的ID,然后插入了它在我的Wordpress网站的侧边栏代码小部件中.开始加载,然后输出此错误;

I found a tutorial with a demo on customizing the 'Facebook Like Box'; it works great on that demo. I grabbed the code, and inserted my page's ID via https://graph.facebook.com/ and inserted it in the sidebar code widget of my Wordpress site. It begans to load, then outputs this error;

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

我在哪里/如何在代码中解决该问题?我还必须在另一个地方更新ID吗?

Where/how can I fix that in the code? Do I have to update the ID in another place as well?

代码:

<div id="facebook">
    <div id="fb-root"></div>
    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>

    <script type="text/javascript">FB.init("fd161b28d6338cb852d8ed87878f67c3");</script>
    <!-- FBML <fb:fan profile_id="284177564941187" connections="18" width="403" height="360" css="http://line25.com/wp-content/uploads/2010/facebook/demo/style.css?5"></fb:fan> FBML -->
    <script src="http://line25.com/wp-content/uploads/2010/facebook/demo/js/fbvalidate.js" type="text/javascript"></script>

</div>

我正在尝试使用此代码来解决"Facebook Like Box"的常见问题-推荐答案

为什么要使用FeatureLoader?已弃用并标记为不久将其删除.

Why are you using FeatureLoader? That's deprecated and marked for removal shortly.

喜欢"框代码可以从 https://developers.facebook获取.com/docs/reference/plugins/like-box/

这篇关于如何使此代码适用于自定义"Facebook Like Box"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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