With all the controversy surrounding Facebook and the Russian ads, one might imagine that the company's bottom line is being affected. But that couldn't be further from the truth. The social network has once again beaten expectations, with shares reaching an all-time high.

Facebook reported earnings of $1.59 per share on $10.3 billion in revenue for Q3 2017. Analysts had been looking for $1.28 per share on $9.48 billion in revenue. The figures mark a YoY profit increase of 79 percent, while total revenue is up 47 percent.

Facebook stock, which has risen almost 59 percent since the start of 2017, reached $182 per share on the back of the news. The company also revealed the number of active monthly users has increased to 2.07 billion, up 16 percent since last year, and it now boasts 1.37 billion daily users.

As usual, advertising was Facebook's primary earner, bringing in $10.142 billion in revenue, up 49 percent from last year. Mobile ads account for most of the advertising revenue---88 percent---a four percent YoY jump. "Video is exploding, and mobile video advertising is a big opportunity," said Chief Operating Officer Sheryl Sandberg.

In a letter to investors, Mark Zuckerberg warned that future profits could be affected as it spends more money tightening security on the platform. "Our community continues to grow and our business is doing well," the CEO wrote. "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."

Zuckerberg said the extra spending would include adding 10,000 people to its review process, monitoring for content such as child pornography, terrorism, and state-sponsored interference on the platform. The company already has 23,165 employees, up 47 percent from one year ago, but it's likely most of the new additions will be contractors.

Facebook expects its total expenses for next year to increase by as much as 60%.