简体   繁体   English

Facebook“赞”未在时间表上发布

[英]Facebook “like” doesn't post on timeline

I want to have a "Like" Facebook button on my WordPress page. 我想在WordPress页面上有一个“ Like” Facebook按钮。 I tried using both plugins and straight code from the Facebook docs. 我尝试使用Facebook文档中的插件和直接代码。 Both work, but my "likes" don't publish on my timeline. 两者都有效,但是我的“喜欢”并未在时间轴上发布。 I did put my AppID there, what can it be? 我确实把我的AppID放在那里了,那是什么?

fb-root code: fb根代码:

<div id="fb-root"></div>
<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/pl_PL/all.js#xfbml=1&appId=###"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>`

fb:like code: fb:类似代码:

<fb:like href="<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>" send="true" width="450" show_faces="false"></fb:like>`

Check your Activity Log on Facebook to see if the 'Like' has shown up on your profile. 在Facebook上查看您的活动日志,以查看个人资料中是否显示了“赞”。 The Like may have been posted as 'Recent Activity' or as a individual 'Someone has liked ...' post. “赞”可能已发布为“近期活动”或单独的“某人已赞...”帖子。

I would use the Facebook debugger to lint your site/page where the like button resides: 我将使用Facebook调试器来整理您的站点/页面,如“赞”按钮所在的位置:

https://developers.facebook.com/tools/debug https://developers.facebook.com/tools/debug

This will tell you if you have any issues with the like button and or the OG tags on the page. 这将告诉您页面上的“喜欢”按钮和/或OG标签是否有问题。

Hope this helps. 希望这可以帮助。

Here is the sample of your html should look like. 这是您的html外观示例。

*Some Tip for you, dont simply like your page if you not sure your website format is correct, because it will submit a record to facebook with wrong title/images/description/content and etc. *为您提供一些提示,如果您不确定您的网站格式是否正确,请不要仅仅喜欢您的页面,因为它会以错误的标题/图像/描述/内容等向Facebook提交记录。

 <html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="https://www.facebook.com/2008/fbml">
 <head>
<title>WooTube</title>
<meta property="og:title" content="WooTube"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://www.wootube.woolei.com"/>
<meta property="og:image" content="http://i.ytimg.com/vi/LD-rmC2i624/default.jpg"/>
<meta property="og:site_name" content="WooTube"/>
<meta property="fb:admins" content="568394401"/>
<meta property="og:description"
      content="WooTube - Share Video To All Your FaceBook Group With 1 Click!"/>
 </head>
 <body>

You will need to submit your Facebook app for review before "likes" will appear in user's timelines, via Facebook's App Dashboard >> Status & Review >> Start a Submission: 您需要先通过Facebook的应用仪表板>>状态和评论>>开始提交,以在用户的​​时间轴上显示“喜欢”之前,提交您的Facebook应用进行审查:

https://developers.facebook.com/docs/apps/review https://developers.facebook.com/docs/apps/review

Probably I'm a bit late :) but given I don't see an accepted answer... 可能我来晚了:),但是鉴于我没有看到可接受的答案...

Are you able to see the right Like count from the FB Debugger ? 您是否可以从FB调试器中看到正确的“喜欢”计数?

If not, probably worth to verify that the outcome of the following code represent the right URL (and with a proper encoding): 如果不是这样,可能值得验证以下代码的结果表示正确的URL(并使用正确的编码):

<fb:like href="<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>

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

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