Over the last couple years, Twitter's (NYSE:TWTR) management has focused its operations on driving toward GAAP profitability. It reached that goal in the fourth quarter, and management said it expected to maintain GAAP profitability over the full year of 2018. Through the first half of the year, Twitter has generated $161 million in net profit.

But expenses may be on the rise soon. In fact, Twitter may have been using accounting sleight of hand to keep some its underlying costs from hitting the books through the first half of the year, according to analyst Michael Nathanson. Twitter posted operating expense growth of 0% and 3% in the first and second quarters, respectively. After looking at the company's quarterly filings with the SEC, Nathanson posits "true underlying cost growth has actually been materially higher in the range of 13 percent to 15 percent."

More importantly, those costs aren't going to come down over time, as the company faces regulatory and security challenges similar to Facebook (NASDAQ:FB), and Twitter also needs to keep investing in things like video content to further its live video strategy.

The @ and # symbols carved in wood and two twitter birds sculpted from old California license plates.

Image source: Twitter, copyright Troy Holden (@troy) for Twitter, Inc.

Can Twitter afford rising costs?

To its credit, Twitter has done a good job reaccelerating revenue growth, which climbed 21% and 24% in the first and second quarters, respectively. Those figures outpace the 13% to 15% growth in true operating costs Nathanson estimates based on Twitter's 10-Q filings. Still, Nathanson's estimate suggests practically all of Twitter's net profits are due to its accounting.

Twitter can't defer those expenses indefinitely, hoping for further revenue growth before they hit its income statement. Nathanson expects the costs to start showing up as early as this quarter.

Twitter is spending on increasing the safety of its platform by policing trolls, enacting measures to comply with regulations like GDPR,  and investing heavily in video. All of these efforts are making it a more attractive place for advertisers, but it's still not showing the return on ad spend of larger competitors like Facebook.

The bump it's seeing in revenue may not be long-lived if Twitter's user base remains relatively flat (as it has been for the last few years). The increase in costs is only beginning, which means Twitter's newfound profitability could be called into question.

Facebook says it's going to see increased expenses

During Facebook's second-quarter earnings call, CFO Dave Wehner warned investors that the company expects full-year 2018 expenses to climb 50% to 60%. That implies further acceleration in expense growth, as expenses only grew 44% through the first six months of the year. Moreover, he expects expenses to outpace revenue growth next year.

Some of Facebook's climbing expenses come from things like augmented and virtual reality development, which are unique to Facebook's situation. But the majority of its expenses will come from increased spending on safety and security, content acquisition, and marketing, which are all areas Twitter is investing as well.

Wehner warned investors to expect lower operating margins in the future, trending toward the mid-30s on a percentage basis. It's hard to see Twitter not suffering a similar fate as it works with regulators, increases policing of its platform, and invests in video content to attract advertisers. Without the scale of Facebook, it'll be that much more difficult for the company to continue posting quarterly profits.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.