Link to “pin it” on pinterest without generating a

2019-01-21 01:24发布

I have a page with tens or hundreds of posts, each one with social buttons. I just can't generate all the buttons for each url: it is too slow (facebook, g+, twitter, pinterest... for hundreds of links). So, instead of the facebook share button to be generated on the fly, I use a simple img pointing to

https://www.facebook.com/sharer.php?u=${url_of_current_post}&t=

When the user clicks on it, a popup window opens with content generated by facebook.

How can I do it for Pinterest? I only find around code to generate the button, but I would like to avoid js at all if possible. Is there something like the following?

http://pinterest.com/pinthis?url=${url_of_current_post}

Please do not try to make me use the js button, thanks.

7条回答
forever°为你锁心
2楼-- · 2019-01-21 01:55

If you want to create a simple hyperlink instead of the pin it button,

Change this:

http://pinterest.com/pin/create/button/?url=

To this:

http://pinterest.com/pin/create/link/?url=

So, a complete URL might simply look like this:

<a href="//pinterest.com/pin/create/link/?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg&description=Next%20stop%3A%20Pinterest">Pin it</a>

查看更多
登录 后发表回答