This isn’t hard, so it’s just a nice example of how to handle instagram.
wp_oembed_add_provider('#http://(www\.)?instagram\.com/.*#i', 'http://api.instagram.com/oembed?url=', true);
Per usual, I have a file called oembeds.php in my mu-plugins folder, where I toss all these. This will work with and without www in the URL. I will warn you, Instagram’s embed is ugly! Here’s http://instagram.com/p/QU1OfbHBTe/
http://instagram.com/p/QU1OfbHBTe/
See? No formatting, nothing to tell you it’s bloody Instagram.
Meanwhile, here’s the tweet it came from:
https://twitter.com/fevered/status/253519604842917889
Much nicer, eh? Of course, Instagram is weird, in that they don’t let you browse images.
2 thoughts on “Instagram oEmbed”
Not even a class or id to target 🙁
Seriously! This is the perfect time to advertise their brand.
Since the FB buyout, though, I wonder if they’ll let you embed FB posts soon…
Comments are closed.