Facebook was once struggling to make the move into mobile.
Priscilla Chan and Mark Zuckerberg. (Reuters)
Facebook almost cancelled its $16 billion (£12.3 billion) IPO in 2012 because its internal Revenue projections were so bad, according to court testimony in a class-action lawsuit.
Mark Zuckerberg wrote the following text to his then-fiancee and now wife Priscilla Chan saying: "Everything here is going really badly. Our revenue projection has gone down so much we now think we might go public at less than $50bn if things continue."
The Financial Times first reported on the court hearing, which took place in Manhattan on Wednesday.
The episode dates from April 2012, when Facebook was struggling to make the switch from desktop into mobile. The company went public in May.
The court heard that Zuckerberg went into a "huddle" with some of Facebook's top executives in a hotel room in New York. He met with then CFO David Ebersman and COO Sheryl Sandberg to discuss whether to float.
When that was over, he then sent another text to his wife saying: "The IPO is on," the court heard. She replied: "Yay".
According to the Financial Times report, investors including the Arkansas Teacher Retirement System are suing Facebook and its underwriters because they allegedly misled investors by failing to disclose that users' switch to mobile was impacting Facebook's revenues. They said the risk had only been described as theoretical.
But Facebook's legal representative, Andrew Clublok, said it wasn't possible for the company to have quantified that risk. Clubok said Facebook's revenues had begun to rebound by the time of the float.
A Facebook spokesman told the newspaper: "We remain confident that our disclosures were complete, accurate, and complied with applicable law."
While Facebook was originally slow to transition to mobile, it quickly evolved to a mobile-first company. By 2013, half its revenues were coming from mobile. It now accounts for 85% of the company's ad revenues.