0

我使用AddThis来分享我的博客文章。当我尝试分享我最近的帖子时,它会在 Facebook 上拉出并显示错误的段落。我不确定如何让它拉出正确的段落。这是我的 AddThis 代码:

<div class="social"><!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
<span class="addthis_separator">|</span>
<a class="addthis_button_compact" href="http://www.addthis.com/bookmark.php?
v=250&amp;pubid=ra-">Share</a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":
true};    
</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250
/addthis_widget.js#pubid=ra-"></script>
<!-- AddThis Button END --></div>
4

2 回答 2

1

要解决此问题,您必须使用 OG 标签来告诉 Facebook 使用什么。这是一个解决我的问题的示例:

<meta content="Title of Page" property="og:title" />
<meta content="Blog Post" property="og:type" />
<meta content="Page URL" property="og:url" />
<meta content="Image to represent blog post." property="og:image" />
<meta content="Site Name" property="og:site_name" />
<meta content="Description of Page or Paragraph to display" 
               property="og:description" />

更多信息可以在FacebookOpen Graph 主页上找到

于 2012-03-11T02:12:03.330 回答
0

什么对我有用

如果您碰巧尝试将 AddThis 与 UTM 代码或其他查询字符串变量一起使用,那么这就是最终对我有用的方法。

根据Sol,使用 OpenGraph 元标记,然后使用FB 调试器验证 Facebook 缓存是否已刷新并正确获取页面标题中的所有正确元标记,然后验证您的 AddThis 共享链接是否没有查询字符串 UTM/变量Facebook。出于我的目的,Index.html 不能包含任何查询字符串变量或 AddThis 将 URL 错误地传递给 Facebook。对我有用的唯一方法是这样的:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?pco=tbx32nj-1.0&amp;url=https%3A%2F%2Fwww.example.com%2Findex.html" target="_blank" ><img src="http://cache.addthiscdn.com/icons/v1/thumbs/32x32/facebook.png" border="0" alt="Facebook" /></a>

什么对我失败了

当尝试使用下面的 AddThis“data_track_addressbar”和“addthis_widget.js”模块进行分享时,Facebook 完全无法拉取新的 OpenGraph 元标签。

<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>
于 2014-05-01T20:20:27.763 回答