pinterest / widgets

JavaScript widgets, including the Pin It button.
Other
211 stars 88 forks source link

Bookmarklet Pulling Media from Pinterest Widget #47

Closed plasticmind closed 9 years ago

plasticmind commented 9 years ago

I created a Pinterest widget for one of our popular recipes using the Widget Builder, and I included in the default sidebar of our site. However, when someone clicks the Pinterest bookmarklet, the image passed to the /pin/create/button/ url is getting displayed, a bad user experience since the image isn't directly related to the main recipe. This is especially problematic when the current recipe only has a small image since it gets dwarfed by the recipe in the sidebar (which usually has a larger, more Pinterest-friendly image).

Since there's no img tag, I can't use nopin="nopin" to tell the Pinterest bookmarklet to ignore it. Is there any other way to keep the Pinterest bookmarklet from displaying images being passed via the media query string?

Thanks,

kentbrew commented 9 years ago

We assume that the image carried forth by a dedicated Pin It button is important and should be promoted. On a page dedicated to a different recipe you're going to confuse your audience with that Pin It button; they're going to see it, click it, and wonder why they're not pinning the main recipe on the page. (The short answer is "don't do that," sorry!)

One way to counteract that effect might be to pin the main recipe and then pass its ID in data-pin-id on the main recipe's image. If we see a data-pin-id we're going to promote the image, but it still may not be enough to get past the image from the Pin It button, if it's bigger.