In the messages users write with eachother, I wish to turn Youtube links into the youtube thumbnail of it+title.
So how can I check if $msg contains a youtube video link, and if it does, it should take the video id (?v=) of it, and run this:
$.getScript( 'http://gdata.youtube.com/feeds/api/videos/$videoid?v=2&alt=json-in-script&callback=youtubeFetchDataCallback' );
How can this be done?