在没有Facebook应用程序/应用程序ID的情况下在网站上启用Facebook评论? [英] Enable Facebook comments on site without a Facebook app / app ID?
本文介绍了在没有Facebook应用程序/应用程序ID的情况下在网站上启用Facebook评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从我可以从Facebook开发文档中阅读的内容来看,这就是我在网站上添加评论框的方式:
From what I can read om Facebook Dev Docs this is how I add the comment box on my web site:
//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>
而且...如果我想在评论中添加管理员,可以将其添加到我的元数据中:
And... If I want to add admins to the comments I can add this to my meta-data:
<meta property="fb:admins" content="jamie.telin"/>
<meta property="fb:app_id" content="xxxxxxxxxxxxxxxxxx"/>
但是我是否正确,因为这是唯一的方法,或者至少我必须创建一个Facebook App才能使用Facebook Comments? 如果我没记错的话,这是以前不需要的.
But am I correct as to this being the only way, or atleast that I must have created an Facebook App to use Facebook Comments? If I am not misstaken, this wasn't required before.
推荐答案
是的,您需要一个App ID.为了拥有App ID,您必须创建一个Facebook App.
Yes, you need an App ID. In order to have an App ID, you have to create a Facebook App.
这篇关于在没有Facebook应用程序/应用程序ID的情况下在网站上启用Facebook评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文