Facebook的帖子上的按钮不能正常工作 [英] Facebook like button on posts not working properly

查看:113
本文介绍了Facebook的帖子上的按钮不能正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次使用开放图表。在这样的任何网址,你可以看到一个类似的按钮,网站的Facebook页面顶部,另一个像按钮后的标题和文章摘要。第二个按钮不按要求工作。如果我喜欢从那个链接,而不是文章,网站的Facebook页面被喜欢,我想显示给其他Facebook用户看到像文章的信息的信息是文章的摘要,而是显示的人像页面alazydude。并且图像也不显示我在开放图形标签中指定的。网站还不完整。我已经尝试过很多次了。



看看这个页面

解决方案

确保您在代码中使用正确的数据href像一篇文章。 (您应该参考该单一文章的网址,即使它位于包含多篇文章的网页上)。



例如:

 < div class =fb-like
data-href =http://www.yoursite.net/articles/unique-article-
data-send =false
data-layout =button_count
data-width =140
data-show-faces =false
data-font =segoe ui>< / div>

Facebook开发了一个方便的小工具来为您创建代码!
确保您查看> Facebook开发人员页面就像按钮



当这样做正确的时候,它应该从该链接中获取打开的数据,并同时修复。



您必须确保og数据设置正确。(请访问www.yoursite.net/articles/ unique-article-id-goes-here-or-something-like-that page。)

 < meta property = og:titlecontent =文章的标题/> 
< meta property =og:typecontent =article/>
< meta property =og:urlcontent =same-url-as-the-data-href-from-like-button/>
< meta property =og:imagecontent =url-to-image-you-like-like/>
< meta property =og:site_namecontent =您的网站名称/

祝你好运!


I am using open graph for the first time. In any url like this you you can see a like button for the site's facebook page at top and another like button after the heading and summary of the article. The second like button is not working as required. If I like from that link then instead of the article the website's facebook page gets liked and the information which I want to show to other facebook users who see that like post is the summary of the article but instead it show that the person like the page alazydude. And the image is also not displaying which I have specified in the open graph tag. The website is still incomplete. I have tried many times now.

Have a look at this page. The second like button in the middle is not working properly.

解决方案

Make sure you use the correct data-href in your code to like an article. (You should refer to the URL for that single article, even if it's on a page with multiple articles.)

For example:

<div class="fb-like"
     data-href="http://www.yoursite.net/articles/unique-article-id-goes-here-or-something-like-that"
     data-send="false"
     data-layout="button_count"
     data-width="140"
     data-show-faces="false"
     data-font="segoe ui"></div>

Facebook has developed a handy little tool to create that code for you! Make sure you check out the Facebook Developers page on like buttons.

When this is done correctly, it should get the opengraph-data from that link and that would be fixed simultaneously.

You do have to make sure that the og-data is set correctly. (This is on the www.yoursite.net/articles/unique-article-id-goes-here-or-something-like-that page.)

<meta property="og:title" content="Title of the article" />
<meta property="og:type" content="article" />
<meta property="og:url" content="same-url-as-the-data-href-from-like-button" />
<meta property="og:image" content="url-to-image-you-would-like" />
<meta property="og:site_name" content="Name of your site" /

Good luck!

这篇关于Facebook的帖子上的按钮不能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆