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:
#chucknorris http://t.co/6RD1E0lL
— Sarah (@fevered) October 3, 2012
Much nicer, eh? Of course, Instagram is weird, in that they don’t let you browse images.
Comments
2 responses to “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…