2 min read

oEmbed fun

I’m way behind the times, I know, but I’ve finally had the opportunity to help build an oEmbed provider. Check it out in action:

To get the chart in to this post I used the ChartBlocks WordPress plugin.

The plugin adds ChartBlocks as an oEmbed provider for WordPress. This means that when I insert the URL:

http://public.chartblocks.com/c/5437d110c9a61dad23313fdd/

in to the post on its own line, the blog visits the oEmbed page at:

http://embed.chartblocks.com/1.0/oembed/?url=http%3A%2F%2Fpublic.chartblocks.com%2Fc%2F5437d110c9a61dad23313fdd%2F&format=json

to find out how to embed the chart.

This saves me having to grab the embed code for the chart, or update it if it ever changes. The internet is awesome sometimes!