Companies don't pay tax
Facebook itself paid tax, but it was only doing on behalf of the shareholders, the employees, and the customers of Facebook. In other words it was people who paid the tax, in lower dividends, lower wages or more expensive product prices.
Companies don't pay tax, people do. All companies do is collect it and act as a tax collector for HMRC. Even employers NI is really a tax that employees pay, it's just that they don't see it but it does affect their salary, making it lower.
So Facebook staff got a nice bonus. Well they pay tax. So Facebook itself paid a low corporation tax and did so by giving the staff a bonus. Tax was not avoided, just redirected and assigned to a different accountancy column.
PS. Corporation tax is on the PROFIT a company makes. If it decides to invest, or give large bonuses, or dividends which lower profit then it will lower the corporation tax. That is all legal, and moral, and ethical. Corp tax is not on turnover.