Facebook is built on a combination of many languages. They chose the right language for the right application. Some of the technologies used are PHP, Java, C++, and Ruby, if I'm not mistaken. They don't use Microsoft technologies, as the previous poster stated.
Myspace is .net, I dont believe Facebook is as my under standing was it includes PHP, C, C++, Erlang amongst others
No Microsoft Technologies at all runs on LAMP stack ... PHP, C++, MySQL, Memcache, Thrift, Cassandra, HipHop (Translates PHP to Optimized C++).
I heard that Facebook developers used PHP (with own PHP-interpreter) and DBMS MySQL. Also they used some fragments in C code for speed and perfomance.
Its front end is definitely PHP you can tell from the urls as well as the strange error messages you get from time to time.