I wonder how does facebook parse video links from different sources (youtube, dailymotion but also other smaller services) and displays them in their own player on the wall
I actually have an idea for a project but it would involve ability to pass video link to any video service
Any idea how is it done?
They have a list of sites and a way to map those sites to their respective embedded players.
For example, if you paste in a YouTube URL, such as http://www.youtube.com/watch?v=jCdtS8uTocM, Facebook knows that you can embed the video with:
It really is that simple. There is no such thing as making this work for any video service. Not possible. Everyone can do something different.
However, you could parse through and look for common video resources, such as FLV, if you wanted. This is likely much more trouble than it is worth. These days you’d have to be executing JavaScript to find them all.
Prebuild templates for YouTube, Vimeo, and any other popular video sites, and you’re set.