Can I use a ShareThis/AddThis Button if my site's navigation relies on Hash tags in the url?

若如初见. 提交于 2019-12-06 15:28:46

Just replace the # with %23 (the URL encoded version of #) and you'll be fine. ;) I like to use the "remote" version of addthis : http://www.addthis.com/bookmark.php?url=your_url_here%23hash_tag_here

The javascript button's share-url can be set manually for both services.

AddThis docs: http://www.addthis.com/help/sharing-api

Excerpt from ShareThis doc's (http://blog.sharethis.com/faq/developers-faq/sharethis-api-examples/)

Define Your Sharable Objects:

Using the ShareThis API, it is easy to define the sharable objects. As an example, a website that sells products is able to define such detail as title, description, product image. When an item is shared, the recipient will be able to see all the details defined. Here is an example of code that could be used:

<script language="javascript" type="text/javascript">
    SHARETHIS.addEntry({
        title:'Best Digital Camera',
        summary:'This digital camera has all the features one would ever need!',
        url:'http://mystore.com/digitalcamera',
        icon: 'http://path.to/icon'
    }, {button:true} );
</script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!