I have a JavaScript function for sharing Pinterest as follows:
function shareOnPinterest(url, desc, coverImage){ var str = "http://pinterest.com/pin/create/button/?url=" + encodeURIComponent(url) + "&media=" + coverImage + "&description=" + desc; window.open(str, "_blank"); }
The url is working fine, but when I click the Pin It button, it is not fixed on the board.
I have a link to this Pinterest JavaScript on my page.
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
Is there something I did wrong, or is there another way to share with Pinterest?
Thanks.
source share