share this multiple on the same page
Asked Answered
P

2

5

I have a personal page (not a cms) where I want to insert multiple sharethis plugin But it seems that code is setted only for one in the page

code into HEAD:

<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "c980sss5aeb6640f"}); </script>

code into body:

<span class='st_sharethis' displayText='ShareThis'></span>
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Tweet'></span>
<span class='st_linkedin' displayText='LinkedIn'></span>
<span class='st_email' displayText='Email'></span>

...how can I set multiple in your opinion?

The problem is that I want that every group of share buttons will be referred to a different post. I have different post in my page and I want that everyone has a sharethis group of icon like that and that they will be referred to a specific url

Previous answered 16/2, 2012 at 0:15 Comment(0)
P
10

Ok i found it by myself

this is the answer:

<span class='st_sharethis' st_title='<%= scoop.title; %>' 
      st_url='<%= scoop.url; %>' displayText='ShareThis'></span>
<span class='st_facebook' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Facebook'></span>
<span class='st_twitter' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Twitter' ></span>
<span class='st_pinterest' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Pinterest' ></span>
<span class='st_email' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>'    displayText='Email'></span>
Previous answered 17/2, 2012 at 16:8 Comment(0)
W
1

This code is working for me.

http://jsfiddle.net/zxg59/

I would just duplicate the code in the body, but not the script tags in the head.

Whatley answered 16/2, 2012 at 0:23 Comment(2)
Also, I don't think that it is a big deal in this case, but I would not publish my API key for a service on a public forum :)Whatley
Hi David, tx for your answer but, it's a fake api key ;) The problem is that I want that every group of share buttons will be referred to a different post. I have different post in my page and I want that everyone has a sharethis group of icon like that and that they will be referred to a specific url...Previous

© 2022 - 2024 — McMap. All rights reserved.