繁体   English   中英

JavaScript的Facebook的像按钮不起作用

[英]javascript facebook like button is not working

在我的网站上,我有一个“喜欢Facebook”按钮(喜欢我的Facebook页面)。 到目前为止,它一直运行良好。 当某人单击“喜欢”按钮时,它就像页面一样,然后立即切换到不喜欢该页面的先前模式。 在我的主页上,我收到此错误

There was an error liking the page. If you are the page owner, please try running your page through the linter on the Facebook devsite (https://developers.facebook.com/tools/lint/) and fixing any errors.

我试图扫描我的页面,但没有错误也没有警告。 我还尝试在此处https://developers.facebook.com/docs/reference/plugins/like/创建一个新的“赞”按钮,但尝试的每个页面(甚至不是我的页面)都如( http://www.facebook.com/americanexpress )我仍然遇到相同的问题(您可以在Facebook上看到此问题,而不必将代码粘贴到您的页面上)。 Facebook是否更改了任何代码或其他内容? 我是否需要更改任何代码(例如Java脚本)?

试试这个:

<div class="fb-like" data-href="https://www.facebook.com/ILoveItWhenGirlsLookAtTheirOwnBoobs" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div>

它在我的博客上正常工作。 您可以在这里查看我的博客:

http://mostvisitedbloginasia.blogspot.com/

对于您的页面,只需更改页面的用户名。 看起来像:

<div class="fb-like" data-href="https://www.facebook.com/YOUR-USER-NAME" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div>

它将正常工作!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM