It's been a forgettable year for investors in the social-media giant. Facebook (META 1.16%) has been under fire from just about everyone -- from government regulators to Wall Street to Main Street.

It all started with news that a little-known analytics firm called Cambridge Analytica had accessed users' private data on the social network during the 2016 presidential election. That set off a maelstrom of ire directed toward Facebook, how it handles its user information, and the content allowed on the network.

In an effort to crack down on misuse, Facebook has embarked on a journey to shore up the data it collects and scrutinize the content that gets posted a little more carefully. While security isn't a bad thing -- we're talking about a software-application company with over 2.6 billion monthly users worldwide -- the stock's reaction would say otherwise.

A bear market for social media

Revenues have continued to grow at a torrid pace for Facebook in spite of slowing growth in user count and mounting scrutiny. The company's advertising platform delivered 33% more sales than a year ago during the third quarter of 2018. The problem, though, is that profit margins are shrinking as the company spends heavily on security and updating its services to reflect users' moves toward more video consumption.

This is made evident in the year-to-date results issued so far.

Metric

Nine Months Ended September 30, 2018

Nine Months Ended September 30, 2017

YOY Increase (Decrease)

Revenue

$38.9 billion

$2.77 billion

40.4%

Total costs and expenses

$21.8 billion

$14.8 billion

47.3%

Operating profit margin

44.7%

46.4%

(1.7 ppts.)

Earnings per share

$5.20

$3.95

31.6%

Data source: Facebook quarterly earnings. YOY = year over year. Ppts. = percentage points.

Falling operating profit margins (not actual profit) is the main cause for the 20% drop in Facebook shares so far. The operating profit margin was actually down to 42% during the third quarter (compared with 50% a year ago), and Facebook expects it to dip into the 30% range over the long term. The fear is that rising expenses could put a cap on earnings in the near future.

The long way home

However, earnings growth still is alive and well despite higher expenses. That is unlikely to change. Facebook expects revenues to decelerate a mid- to high-single-digit percentage rate compared to the third-quarter growth rate. With the third-quarter growth rate at 33%, that still equates to an easy double-digit gain to finish off 2018.

A man pressing an illustrated thumbs up icon, representing a "like" on Facebook.

Image source: Getty Images.

Sales growth will likely come from "stories" and other video content, as building ads into these newer network features is still a work in progress. As Facebook makes that transition, its management believes the company will come out even stronger than ever from higher advertising pricing and user engagement.

That adds up to a pretty good value on what remains a high-octane stock. Forward price to earnings sits at 19.0 -- not the cheapest tech giant out there, but a steal if Facebook continues to grow its bottom line north of 20% as forecast. In short, 2018 has been ugly, but this bad year could be buying opportunity for long-term investors looking for a deal.