But even these pleasant surprises didn't seem to cheer investors. After closing at $127.17, Facebook shares tumbled more than 2.7 percent immediately after the report in after-hours trading. The stock made a modest recovery, but then plunged even further when Facebook executives said on an earnings call that they plan to increase spending even as they expect ad revenue to slow next year. Shares then plunged 7 percent.

AD

AD

Some of the sell-off may have been because Facebook's revenue grew 56 percent year-over-year — a slightly slower pace than what the company had reported in the past. Last quarter, the social network reported it had grown 59 percent from the same time the previous year.

Still, Facebook is strong on the fundamentals of its business. The company continues to build its user base, particularly on mobile devices. The company said that this quarter, for the first time in its history, it had more than one billion monthly active mobile users.

Facebook now gets 84 percent of its advertising revenue from mobile devices, a critical metric in an increasingly wireless age. Overall, Facebook said it now has about 1.8 billion monthly active users.

AD

Of course, the social network is just a part of what Facebook does. The tech firm made it clear that it has its eye on a much broader and longer timeline. "We had another good quarter," said Facebook chief executive Mark Zuckerberg in a statement. "We're making progress putting video first across our apps and executing our 10 year technology roadmap."

AD

“In most social apps today, a text box is still the default way we share,” Zuckerberg said on the earnings call. “Soon, we believe a camera will be the main way that we share.”

The road to a more visual network hasn't been completely smooth. The company recently admitted that it had miscounted video traffic in a way that could have inflated views by as much as 60 to 80 percent, according to a report in the Wall Street Journal last month. Facebook has since corrected its error. But the problem stunned the advertising world.

AD

Long-term investments from Facebook range from its virtual reality Oculus Rift headset, to its continued build-out of WhatsApp and other messaging programs, to its fleet of drones that provide Internet access to rural areas around the world. Chief financial officer Dave Wehner said on the call that 2017 will be an “aggressive investment year.”

AD

Some analysts warned that it will take time for Facebook's many projects to pay off.