A way to point Pinterest save button the right (hashed)url for a specific photo?

202 views Asked by At

I have a gallery of photos, each photo has an unique-id wrapper like:

<div id="photo123"><img src="photo123.jpg"></div>
<div id="photo124"><img src="photo124.jpg"></div>
<div id="photo125"><img src="photo125.jpg"></div>

When I enter this page from another page with thumbnails, the page link is like: http://example.com/gallery1#photo124 which scrolls the page to the second photo.

My user has a Pinterest Save Button (Chrome) extension, which displays "save" button over my gallery photos. When user enters this page using URL: http://example.com/gallery1#photo124 and tries to "pin" photo id=photo125 - it all works fine, except the link - Pinterest saves the photo to Pinterest user board with URL of the page: http://example.com/gallery1#photo124 - so when someone clicks the Pinned photo on user Pinterest board he goes to the right page but the page is scrolled to a wrong location - #photo124.

Is there a way to show Pinterest the right (hashed) url for each photo? Like for instance:

<div id="photo123" data-url="http://example.com/gallery1#photo123"><img src="photo123.jpg"></div>
<div id="photo124" data-url="http://example.com/gallery1#photo124"><img src="photo124.jpg"></div>
<div id="photo125" data-url="http://example.com/gallery1#photo125"><img src="photo125.jpg"></div>

I couldn't find any docs on that.

1

There are 1 answers

0
Picard On

Looks like I wasn't very far from the solution just by guessing - the correct way to point pinterest to the right url is by 'data-pin-url' attribute:

<div id="photo123" data-pin-url="http://example.com/gallery1#photo123"><img src="photo123.jpg"></div>
<div id="photo124" data-pin-url="http://example.com/gallery1#photo124"><img src="photo124.jpg"></div>
<div id="photo125" data-pin-url="http://example.com/gallery1#photo125"><img src="photo125.jpg"></div>