In: Accounting
I could not find much about twitter but definitely will guide you about Facebook.
Facebook does invest in financial securities and classify them as Marketable securities. The latest available annual report pertains to 2016, whereby it held Maturity securities worth $20,546 millions.
As can be seen, the marketable securities comprise of US Government securities, US Govt Agency Securities and Corporate Debt securities. They are classified as marketable because of their nature being highly liquid.
In my opinion, companies like Facebook has lot of cash on their balance sheet and they need that cash to acquire various businesses. They do not indulge in heavy investing in financial securities, they invest the surplus funds in government securities which are secured, safe and easily convertible to cash and at the same time earn a nominal income.
Source: Facebook Annual Report 2016
Hope this suffice