Ad

Create A New Pin With The Pinterest Javascript SDK

- 1 answer

I'm trying to create a new Pinterest Pin with the PDK JS api (https://developers.pinterest.com/docs/sdks/js/).

PDK.pin({
    image_url: ImageUrl,
    note: Description,
    link: ShareUrl
}, function(res){
    console.log(res);
});

It makes the request but none of the params (image, link and note) seem to pass to the api. A working example of the pinterest share pdk working can be found on this website: http://www.vogue.com/13382189/fair-isle-sweaters-runway-christmas-style/

Ad

Answer

I found out that the site was making a pin like so:

window.open(
    'https://www.pinterest.com/pin/create/button/?url=' + data.pdkShareUrl + '&media=' + data.pdkImageUrl + '&description=' + data.pdkDescription,
    'share',
    'width=600, height=300'
);
Ad
source: stackoverflow.com
Ad