How can I make this code work for custom 'Face

2019-08-30 19:35发布

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;

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

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

Code:

<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>

Edit: I'm resorting to this code in attempt to solve my general question with 'Facebook Like Box' - https://stackoverflow.com/questions/7995678/facebook-like-box-close-thumbnail-padding-html5-iframe-v

1条回答
聊天终结者
2楼-- · 2019-08-30 19:40

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

The Like Box code can be obtained from https://developers.facebook.com/docs/reference/plugins/like-box/

查看更多
登录 后发表回答