Fun with oEmbed and Twitter

This tweet is being displayed using oEmbed between WordPress and Twitter. This capability was added a few minutes ago after I pasted Otto’s code snippet into my theme’s functions.php file:

That’s pretty remarkable. I’ve embedded a tweet that has an embedded Youtube video in it. I didn’t even bother to wrap the URL in the [ embed] … [ /embed] shortcode, I just pasted in the link to that tweet.

That’s very cool! It shouldn’t be long before this is put into a plugin; I put it into my theme’s functions.php because I’m used to poking in there.

Interestingly enough, when the Twitter Blackbird Pie plugin is activated it overrides the oEmbed output and puts the tweet into that nice format that they use. For now I’ll use the oEmbed option.

2 thoughts on “Fun with oEmbed and Twitter

  1. If you want to use it in a plugin, add this in front of it and put it in it’s own PHP file in the plugins directory:

    Plugin Name: Twitter oEmbed Enabler

    Voila, you have a plugin. Magic. Safer than using the theme's function's php file.

    1. Thanks, I’ve just done exactly that and now it’s enabled as a plugin.

      Considering how often I muck around with that functions.php file, that’s much safer!

Comments are closed.