This script does exactly what it says on the tin. Sometimes it’s not possible to get content delivered in the way you want. Here we’re dealing with a single string outputted from something like a database. My script matches Youtube and Vimeo links, strips them from the original string and then embeds them as a video. I haven’t written the code to embed Vimeo videos but I’m sure you can work that out.
When Twitter updated their API and how users could draw down tweets I needed to find a solution that could authenticate with Twitter. Using the tmhOauth Library to connect to the Twitter API using an API key, secret and token I was able to cache tweets to a local file and render them on the page using my tweets object.
For the plugin to work you’ll need to update the API keys and the path to the folder where you’ve uploaded the files. Don’t forget to download the tmhOauth plugin from github and throw tmhOAuth.php and tmhUtilities.php into your plugin folder.