Can you have a "Share this via Pinterest" button a website?

jing0

Junior Member
Joined
Apr 15, 2012
Messages
100
Reaction score
12
Hey guys,

I'm getting a website made (which will be mostly image based) and so I was wondering, is there such functionality where a user can click the Pinterest button and share the image like that? In the same way you would have share via Facebook and Twitter. Or would the user have to manually pin the image?

Thanks :)
 
Yup! Here you go dude:
Code:
<script type="text/javascript">
(function(d){
  var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
  p.type = 'text/javascript';
  p.setAttribute('data-pin-hover', true);
  p.async = true;
  p.src = '//assets.pinterest.com/js/pinit.js';
  f.parentNode.insertBefore(p, f);
}(document));
</script>
No HTML is required for hoverbuttons; all you have to do is load the JavaScript listed below. Once you have this installed, images should show a Pin It button when hovered over. (If you're already running pinit.js, just add the data-pin-hover="true" attribute to the existing SCRIPT tag.)

More options here:
http://business.pinterest.com/widget-builder/
 
Back
Top