Forums | Mahara Community
Pinterest in Mahara
14 September 2016, 4:09 AM
Can you embed Pinterest boards into a Mahara page? I have tried embedding the link and embed code using the external media option but no joy!
Any help would be gratefully received.
Newman University, Birmingham.
14 September 2016, 5:00 PM
Pinterest doesn't provide a normal embed code like many other services. It looks very different and also requires that a script is added to the body of a page. The script would call the pin and include in the page as you only specify the URL for the pin but nothing else like usually. I couldn't get it to work with Embedly either because Pinterest revoked access to its API: https://blog.embed.ly/pinterest-a067705d3d13#.wt839xnhl I suspect that this might also prevent us from creating a custom filter for Pinterest. When I try creating an Embedly Card, it doesn't show the pin but still only the link to the Pinterest pin.
For reference, the embed code looks like the following for a pin:
Copy and paste this code into your page where you want your add-on to appear: <a data-pin-do="embedPin" href="https://nz.pinterest.com/pin/36591815696169977/"></a> Don't forget to include pinit.js once per page, right before the closing </BODY> tag. <script async defer src="//assets.pinterest.com/js/pinit.js"></script>
15 September 2016, 11:21 AM
To expand on what Kristina said, here's the link to Pinterest's own documentation about embedding Pinterest boards: https://developers.pinterest.com/tools/widget-builder/?type=board&boardHeight=240&boardWidth=400&imageWidth=80&template=square
It won't work with Mahara's "external media" block because it uses an <a> tag, not an <iframe>. But you could put that <a> link into a Text or Note block.