Pinterest several parameters for the detailed URL in description

I integrate the Pin it function on my website, but I cannot pass in a few parameters in the URL or description. I tried with the following code

$detail_wow_pin = $baseurl.'/wow/Wowitems/wowdetail? obj_id='.$obj_id.'&amp;obj_type='.$obj_type; <a href="http://pinterest.com/pin/create/button/? url=http://softprodigy.in/thinkbright/wow/Wowitems&media=<?=$wowimg?> &description=<?='http://'.$_SERVER['SERVER_NAME'].''.$detail_wow_pin?>" count-layout="none"> <img src="<?php echo IMG_WOWS; ?>/img/pinterest.png" alt=""> </a> 

thanks

+4
source share
2 answers

I correctly find the URL encoding the whole href, confirming the ampersand (&) encoding as inside the href attribute. In addition, it encodes as% 26 inside the url parameter and moves the url parameter to the last place in the href attribute, correctly creates a link to the page containing the image when you click on your PIN code.

Example:

 <a href="//pinterest.com/pin/create/button/?media=http%3a%2f%2example.com%2fImages%2fimage.jpg&amp;description=Example+description.&amp;url=http%3A%2F%2Fexample.com%2FExample%2FExample.php%3Fparam1%3Dvalue1%26param2%3Dvalue2%26param3%3Dvalue3"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png"></a> 
+6
source

Dynamic Link for Pinterest

Below code will create a dynamic pinterest button for different pages.

 <a href="http://pinterest.com/pin/create/button/?url=http://www.example.com/page-one&amp;media=http://www.example.com/image/cache/data/image.jpg&amp;description=description will come here" class="pin-it-button" count-layout="none"> <img src="http://assets.pinterest.com/images/PinExt.png" data-cfsrc="//assets.pinterest.com/images/PinExt.png" title="Pin It" border="0"> </a> 
0
source

Source: https://habr.com/ru/post/1435020/


All Articles