AddThis没有选择标题和描述

时间:2013-11-19 14:10:06

标签: social facebook-social-plugins addthis

我正在尝试使用AddThis在我的website上进行共享。我已经在页面顶部设置了常规共享工具箱,我想使用此工具箱来共享有关我的页面的一些常规标题和说明。除此之外,对于每张幻灯片,我想为twitter和facebook设置特定的分享按钮。现在将这些添加为文本下方的链接。但是,当我点击它时,它们不会生成我在URL中指定的标题和描述:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http://ba-timeline.appspot.com/#4&title=Hellothere&description=Opis" rel="nofollow" target="_blank">FB</a> 

<a href="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http://ba-timeline.appspot.com/#4&title=Hellothere&description=Opis" rel="nofollow" target="_blank">TW</a> 

我在这里做错了吗?

1 个答案:

答案 0 :(得分:2)

Facebook不像其他AddThis按钮那样工作。 Facebook不是接受我们传递的参数,而是请求您共享的URL,并从标题中的元标记和链接标记中获取它显示的数据。要控制在Facebook上共享页面的方式,您应该使用Facebook文档中描述的OpenGraph标记:http://developers.facebook.com/docs/opengraph/

您还需要将URL参数中的#符号更改为%23,否则我们的服务器会认为它是附加到/ offer URL而不是appspot URL的锚点。试试这个:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http://ba-timeline.appspot.com/%234&title=Hellothere&description=Opis" rel="nofollow" target="_blank">FB</a> 

<a href="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http://ba-timeline.appspot.com/%234&title=Hellothere&description=Opis" rel="nofollow" target="_blank">TW</a> 
相关问题