Facebook paid less than £5000 in corporate tax last year in the UK. By reasonable methods of accounting, they should've paid around £40 million in UK corporate tax (based on global profits of £2bn and assuming that the UK accounts for around 10% of that.) How does Facebook do that?
Simple: they don't register a profit in the UK. Facebook UK buys a service from another company owned by Facebook, and the price of this service is their entire profits in the UK. The other company is registered in a tax haven and pays zero income tax. Usually this is highly illegal and gets your entire C-team sent to prison ASAP. But because the European Union lacks unity, there's an obscure Rube Goldberg accounting machine that funnels the money through multiple EU states and tax systems and lands it in the bank account of a shell company in the Bermudas, giving the company a fig leaf of justification to put a big fat zero in the profit box of their yearly accounts.
Not having to pay corporate tax gives Facebook a major leg up in the market. They've got more cash to invest and they can invest it when they want (instead of the usual "Oh no, the end of the tax year is coming! We have to get rid of all this money, let's buy some useless junk, stat!!") Over a single year, Facebook may only be able to invest 10-20% more than an identical tax-paying competitor. However, over a decade, the difference compounds. The end result is that Facebook becomes several times larger than its tax-paying-but-otherwise-identical competitors.
The next frontier in not paying tax for Facebook is the US tax system. The US corporate tax deducts 35% from Facebook's profits every year, making it highly vulnerable to competition that doesn't pay US taxes. Once Facebook manages to not pay tax in the US, its growth is going to go stratospheric and make it wildly successful.