How have they done this smart thing that when you paste a youtube link in “What are you doing right now?” then there comes up in Links, youtube picture + title + description? how have they done this, and is it hard to do? Example of doing this would be great!
Share
One way of doing this is to use the Youtube Data API (http://code.google.com/apis/youtube/2.0/developers_guide_protocol_video_entries.html).
You send the video id, which is in the link to a video, to the api, and it returns all the data you need in an xml/JSON format, depending on what you specify in the url.
Example:
If you were given the video link http://www.youtube.com/watch?v=NWHfY_lvKIQ, you could get all the info about the video by using this link, http://gdata.youtube.com/feeds/api/videos/NWHfY_lvKIQ. The data returned contains all the information about the video, including title, description, and a thumbnail.