-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for pinterest embed code conversion to amp-pinterest tag #46
Comments
This is basically working. Not closing the ticket right now -- there is display related issue for large pins. I don't think that this due to anything wrong with our code. Rather enough space may not be available. However, just keeping ticket open for now. Please note that we're only implementing pins for pinterest. We're not implementing pinterest buttons (analogous to facebook like buttons). |
I worked on this ticket today. Sadly I found another display issue with pinterest pins for which there is no known solution at the moment. The problem is that AMP layouts like responsive want both a height and a width. Depending on the text on the pinterest pin, some pins may be larger and some smaller. So if you set a fixed height value some pins may get chopped off at the bottom when being displayed. Now the embed code looks like this: <a data-pin-do="embedPin" data-pin-width="medium"
href="https://www.pinterest.com/pin/99360735500167749/"></a> So we can take a standard pin width (depending on With instagram this problem was resolved by querying the instagram (non-authenticated) oembed endpoint to get the height and width. pinterest has endpoints but you need to setup an Oauth2 application (etc. etc.)... maybe there is very simple fix lurking around. i'll keep working on this and trying to figure this out... |
(Note that pinterest functionality is available since last few releases and on master but it has the above described problems) |
There is a workaround available. If your pins are getting chopped off, then please provide the height and width explicitly in the embed code. These will get carried over into the So don't simply paste something like: <a data-pin-do="embedPin" href="https://in.pinterest.com/pin/553450241686727721/"></a> But add the <a width="236" height="778" data-pin-do="embedPin"
href="https://in.pinterest.com/pin/553450241686727721/"></a> These width and height values are available from the pinterest widget builder e.g. |
The workaround should suffice. Closing ticket. Please re-open if necessary. |
Add support for pinterest embed code conversion to
<amp-pinterest>
See
https://www.ampproject.org/docs/reference/extended/amp-pinterest.html
Also see
https://developers.pinterest.com/tools/widget-builder/
The text was updated successfully, but these errors were encountered: