The real assets for Facebook, though, are its user relationships and the data stream this generates (where currency of data and interrelationships among it are key) by which it can generate advertising and other revenues through its true customer relationships -- the relations between FB and those entities paying cash on the barrelhead (or however the cool kids are conducting monetary transactions these days).
Brand identity, network effects, and a few other things also come into play.
Source code may weaken portions of the value e or expose windows of vulnerability. It's by no means the most valuable asset though.
Data is an IP asset, just one that you cannot get a patent for, nor copyright or trademark protection, and so it must be kept private rather than disclosed.
You trademark your branding, patent your designs and processes, copyright your software and protect your data as a trade secret.