AddThis 拉错段落
我使用 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&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>
I use AddThis to share my blog post. When I try to share my most recent post it pulls and displays the wrong paragraph on Facebook. I am unsure how to get it to pull the correct paragraph. Here is my AddThis code:
<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&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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要解决此问题,您必须使用 OG 标签来告诉 Facebook 使用什么。以下是解决我的问题的示例:
更多信息可以在 Facebook 和 打开图谱主页
To solve this issue you must use OG Tags to tell Facebook what to use. Here is an example that solved my issue:
More Info can be found on Facebook and the Open Graph Homepage
对我有用的方法
如果您碰巧尝试将 AddThis 与 UTM 代码或其他查询字符串变量一起使用,那么这就是最终对我有用的方法。
根据 Sol,使用 OpenGraph 元标记,然后使用 FB 调试器 验证 Facebook缓存已刷新并正确获取页面标题中的所有正确元标记,然后验证您的 AddThis 共享链接到 facebook 中是否没有查询字符串 UTM/变量。出于我的目的,Index.html 无法包含任何查询字符串变量,或者 AddThis 将 URL 错误地传递给了 Facebook。对我有用的唯一方法如下:
对我来说失败的地方
当尝试使用下面的 AddThis“data_track_addressbar”和“addthis_widget.js”模块进行共享时,Facebook 完全无法提取新的 OpenGraph 元标签。
What Worked For Me
If you happen to be trying to use AddThis with UTM codes or other querystring variables, here's what finally worked for me.
As per Sol, use OpenGraph meta tags but then use the FB Debugger to verify that Facebook cache has been refreshed and got all the proper meta tags in the page header correctly, then verify that there are no querystring UTMs/variables your AddThis sharing link to facebook. For my purposes, Index.html couldn't include any querystring variables or AddThis passed the URL incorrectly to Facebook. The only way that worked for me looks like this:
What Failed For Me
When trying to use the below AddThis "data_track_addressbar" and "addthis_widget.js" modules for sharing, Facebook completely fail to pull the new OpenGraph Meta Tags.