The market was caught sleeping in one area. 

Facebook Inc. (FB) - Get Report shares were rising after-hours on Wednesday after significantly exceeding analysts' consensus estimates for both earnings and revenues.

But co-founder and CEO Mark Zuckerberg warned in a statement accompanying the earnings that the company's profitability will be affected by ongoing investments in security and preventing abuse. Facebook and other tech giants have been testifying before Congress this week about the role their platforms and services played in Russian interference in the U.S. presidential election.

TheStreet is hosting a live blog analyzing Facebook's third quarter earnings report and investor call. Please join us!

"Our community continues to grow and our business is doing well," wrote Zuckerberg. "But none of that matters if our services are used in ways that don't bring people closer together. We're serious about preventing abuse on our platforms. We're investing so much in security that it will impact our profitability. Protecting our community is more important than maximizing our profits."

Image placeholder title

Shares were up 1% to $184.65 after-hours, following a session in which Facebook ended at an all-time closing high. Shares are up more than 50% this year. 

Facebook reported third-quarter revenues of $10.33 billion vs. $9.84 billion expected, representing an increase of 47% from the year-ago period. Earnings came in at $1.59 per share, vs $1.28 expected, an increase of 77%. 

Facebook reported 1.37 billion daily active users, slightly ahead of expectations of 1.36 billion, and 2.07 billion monthly active users, also a hair above expectations of 2.06 billion. 

Mobile ad revenues accounted for about 88% of total ad revenue, up from 84% in the year ago period. And headcount increased 47% from a year ago to 23,165. 

Facebook is a holding in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells FB? Learn more now.

More of What's Trending on TheStreet: