FB共享按钮不再显示 [英] FB Share button is not being displayed anymore
本文介绍了FB共享按钮不再显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新:该按钮又回来了: Facebook共享按钮:它正式失效了吗? ?
Update: the button is back : Facebook Share button: is it officially dead?
我有一个奇怪的问题. Facebook共享按钮已停止显示.使用的代码是
I have a strange problem. The Facebook share button has stopped displaying. The code used is
<p style="margin-top:-50px; margin-left:300px; width:600px;">Join us on Facebook
<a name="fb_share" type="button" share_url="https://example.com/"></a>
<script src="https://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
</p>
自从我被分配处理网站以来,代码未更改.任何想法为什么会这样? HTML在那里.但是没有按钮出现.
The code has not been changed since I was assigned to handle the website. Any ideas why this is happening? The HTML is there. But no button appears.
推荐答案
Facebook不再使用它.
Facebook no longer use that.
请使用以下代码.
并在打开<body>
标记后将其粘贴
And paste this after opening <body>
tag
<div id="fb-root"></div>{literal}
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=YOUR APP ID HERE";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>{/literal}
要在任何地方显示此代码,请添加以下代码:
Anywhere you want this to appear, add this code:
<fb:share-button type="box_count"></fb:share-button>
确保更改应用程序ID,必须先创建应用程序
Make sure you change the App ID, You must create app first
这篇关于FB共享按钮不再显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文