I asked the same question in stackoverflow:
http://stackoverflow.com/questions/4558826/how-does-facebook-social-plugins-work-client-server-code-involved
I am trying to analyze how facebook social plugins work (fbml). You include a .js file and have a special TAG in your html and that's it. There are several problems I can think of that make the above impossible to implement and I do not know how did facebook resolve these issues:
1- Having custom Tags is a pain in IE, you need to define namespaces in the HTML yet they work smoothly with facebook ie: <fb: like>
2- reading the current "likes" for the page you are on requires a cross domain call to query the facebook DB. I thought about a simple scenario, which is calling YQL and it would return an XML which I can parse. but as simple as that sounds, sending an ajax call from IE is being blocked (with permission denied error).
How are the above problems solved?