1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Social Networking Sites' started by jing0, Jun 20, 2013.

  1. jing0

    jing0 Junior Member

    Joined:
    Apr 15, 2012
    Messages:
    100
    Likes Received:
    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 :)
     
  2. Conor

    Conor Jr. VIP Jr. VIP

    Joined:
    Nov 7, 2012
    Messages:
    3,361
    Likes Received:
    5,423
    Gender:
    Male
    Location:
    South Africa
    Home Page:
    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/
     
    • Thanks Thanks x 1
  3. jing0

    jing0 Junior Member

    Joined:
    Apr 15, 2012
    Messages:
    100
    Likes Received:
    12
    Perfect :)

    Thanks man!
     
    • Thanks Thanks x 1