我有一个在Pinterest上分享的JavaScript函数,如下所示:
function shareOnPinterest(url, desc, coverImage){
var str = "http://pinterest.com/pin/create/button/?url=" + encodeURIComponent(url) + "&media=" + coverImage + "&description=" +
desc;
window.open(str, "_blank");
}URL似乎工作正常,但当我单击Pin It按钮时,它并没有固定到主板上。
我的页面上也有这个Pinterest JavaScript的引用。
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>有没有什么地方我做错了,或者有没有其他方式分享到Pinterest上?
谢谢。
发布于 2012-08-16 16:07:50
我不知道你想要什么..。一个按钮,你的网页或简单地固定图像?
此代码用于固定图像:
javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());https://stackoverflow.com/questions/11981639
复制相似问题