AddThis Facebook自定义参数



我正在使用自定义AddThis按钮来分享Twitter和Facebook中的东西…对于Twitter分享,我使用:

addthis:templates="{ twitter: ' {{title}} @ {{url}} via @agenciauzzye' }"

我知道,对于Facebook自定义描述,标题,url,图像和其他东西,我必须使用元标签。问题是,我有一个博客与一个静态页面和所有的内容(帖子)是加载在一个div与AJAX。主页面是一个帖子列表,我有按钮来分享每个帖子…

你们怎么在Facebook上分享内容与AddThis没有设置元标签??

我发现的唯一解决方案是使用直接的Facebook共享URL,没有通过AddThis代码(因此,没有日志进行分析)。比如:

<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[summary]=<?php echo rawurlencode(striptags(abrev_texto(get_output($descricao),1000,"p"," ...",true)));?>&amp;p[title]=<?php echo rawurlencode(get_output($post->titulo));?>&amp;p[url]=<?php echo rawurlencode(ROOT_SERVER . ROOT . "blog/" . $urlAux); ?>&amp;&amp;p[images][0]=<?php echo rawurlencode($imageShare);?>','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)"></a>

您可以在http://blog.uzzye.com

查看更多详细信息

幸运的是,Facebook的开发者足够聪明,他们意识到他们无法预测互联网上所有类型的网页。相反,他们提供了一些简单的元标签来控制这些信息如何传递给Facebook:

title: <meta name=”title” content=”The title of the link being shared” />
short description: <meta name=”description” content=”A description of the page” />
optional thumbnail image: <link rel=”image_src” href=”http://example.com/images/image.jpg” />

当有人在Facebook上与其他人分享你的页面时,你只需要告诉Facebook在链接详细信息中填充什么就可以了。

最新更新