In the UK a corporation takes in revenue - from that revenue, it deducts all necessary outgoings such as operating expenses, wages, investment, acquisitions (asset or otherwise) etc etc. What is left is the profit. Corporation Tax is based on that profit.
According to the full accounts, Facebook made a loss of £28.4Million in the previous financial year off of a turn over of £104Million (the accounts list "administrative expenses" of £131.5Million on that turn over).
The bulk of that administrative expense was staff related costs - a wage bill of £40.8Million, and a deferred share based payments charge of £35.5Million, which along with employers contributions totals £86.3Million.
The figure of £4,327 is based on the loss, as a nominal figure.
The figure of £35Million is based on share options and grants maturing for staff - they aren't straight bonuses, they have been on the books for a long time.