【发布时间】:2012-03-25 19:24:03
【问题描述】:
根据我在 Facebook Dev Docs 中可以阅读的内容,这是我在我的网站上添加评论框的方式:
//In HTML Header
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxxxx', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/sv_SE/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
//Where I want my comments to show
<div class="fb-comments" data-href="<?=curPageURL()?>" data-num-posts="5" data-width="944"></div>
而且...如果我想将管理员添加到 cmets,我可以将其添加到我的元数据中:
<meta property="fb:admins" content="jamie.telin"/>
<meta property="fb:app_id" content="xxxxxxxxxxxxxxxxxx"/>
但我是否正确,这是唯一的方法,或者至少我必须创建一个 Facebook 应用程序才能使用 Facebook 评论? 如果我没记错的话,以前不需要这样做。
【问题讨论】:
标签: facebook facebook-apps facebook-comments