How to share on Pinterest

I have a JavaScript function for sharing on Pinterest like this:

function shareOnPinterest(url, desc, coverImage){

var str = "" + encodeURIComponent(url) + "&media=" + coverImage + "&description=" +
desc;, "_blank");         


The URL seems to be working fine but when I click Pin It button it doesn't pin to the board.

I have a reference to this Pinterest JavaScript on my page too.

<script type="text/javascript" src="//"></script>

Is there anything I did wrong or is there any other way to share on Pinterest?




I'm not sure what you're wanting... a button for your webpage or to simply pin images?

This codes works to pin images:



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.