Search code examples
javascriptpinterest

Pinterest "Pin it" button is not working


I'm trying to integrate pinterest into a website. I want to add "pin it" button. I couldn't make it work. Here is what I'm doing:

  • Went to the following pinterest page:
  • Under “Pin It” Button for Websites:
    • entered website address (http://www.polyvore.com/)
    • entered image url (http://embed.polyvoreimg.com/cgi/img-thing/size/y/tid/40748454.jpg)
    • Copied the code generated under "Basic":
<a href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.polyvore.com%2F&media=http%3A%2F%2Fembed.polyvoreimg.com%2Fcgi%2Fimg-thing%2Fsize%2Fy%2Ftid%2F40748454.jpg" class="pin-it-button" count-layout="horizontal">Pin It</a>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
  • Pasted that before closing body tag.
  • I can't see "Pin it" button as the document explains.

I might be doing something very stupid. Can anybody let me know what am I doing wrong here?


Solution

  • It works but It will give you only link on "Pin It" text. If you want the PinIt button then you need to write like you need to include img tag between anchor tag with given source - src="//assets.pinterest.com/images/PinExt.png" title="Pin It"

    <a
     href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.polyvore.com%2F&amp;media=http%3A%2F%2Fembed.polyvoreimg.com%2Fcgi%2Fimg-thing%2Fsize%2Fy%2Ftid%2F40748454.jpg"`enter code here`
     class="pin-it-button" count-layout="horizontal">  
       <img src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />
                       </a>