Image source: Facebook.

Shares of Facebook (NASDAQ:FB) and Twitter (NYSE:TWTR) have moved in opposite directions over the past couple of years. Facebook stock has reached new all-time highs this summer, while shares of Twitter have traded around their all-time lows this year. Twitter is now worth less by market capitalization than when it made its IPO, and Facebook is now the sixth largest company in the world, with a market cap of $359 billion.

But has the stock market gotten ahead of itself when it comes to Facebook stock? Is it offering value prices for Twitter shares? Let's compare these two head to head to see which is a better buy right now.

Growth stocks need to grow

The biggest reason for Twitter's decline is its lack of growth over the past two years. Not only is its user count moving forward at a snail's pace, but that slow growth is now also translating into slow revenue growth, just as analysts feared. Last quarter, Twitter brought in $602 million in revenue, up 20% year over year and just 1% sequentially.

The drop in revenue growth has led Twitter's price-to-sales ratio to fall from equal with Facebook's, around 18 two years ago, to just 5 today. Facebook, by comparison, has seen its P/S ratio remain high, moving mostly sideways during that time as its revenue continues to grow. Last quarter, Facebook brought in $6.4 billion, up 59% year over year and 20% sequentially.

FB PS Ratio (TTM) Chart

Investors may see Twitter stock trading at a P/S ratio less than one-third of what it was two years ago and think the stock is on sale, but that ratio is just as much a reflection of its future sales growth expectations as its past performance. Twitter expects its struggles to continue next quarter, guiding for revenue of $590 million to $610 million. For those paying attention, that's negative sequential growth at its midpoint, and it's just 5% growth year over year. Analysts are currently giving Twitter the benefit of the doubt that it will come in on the high end and post over 6% year-over-year sales growth for the last two quarters of the year and that sales growth for the year will come in at 15.5%. The disappointing revenue growth has naturally had a negative impact on earnings as well.

By comparison, Facebook is expected to end the year with revenue growth over 51%, an acceleration from 44% growth last year. In fact, sales growth expectations this year are only moderately below Facebook's sales growth in 2014 of 58.4%. As such, it makes sense for Facebook to trade near the same P/S ratio it did two years ago. Next year, analysts expect Facebook to grow revenue "just" 34.6%.

While Facebook trades for a much higher multiple than Twitter, the relative sales growth expectations justify both companies' stock valuations. Considering both companies are positioning themselves for growth, I'd prefer to invest in the company with the best prospects for growing revenue not the one that's struggling to expand.

Why Facebook growth prospects are so much better than Twitter's

Facebook is the beneficiary of a giant, well-established advertising platform as well as the owner of a growing platform in Instagram that's still in the early days of monetization but already bigger than Twitter. On top of that, it has two more properties -- Messenger and WhatsApp -- with huge user bases that it has the potential to unlock value from as well. Not to mention the core Facebook platform continues to grow its users, reaching 1.71 billion last quarter, up 15% year over year.

Twitter, by comparison, is touting the 500 million users who visit its owned and operated properties every month but don't log in as a revenue opportunity. It started experimenting with monetizing that audience in the fourth quarter, but it has yet to produce meaningful results. That might change this fall, when Twitter starts live-streaming big events such as Thursday night football. Analysts aren't expecting a significant uptick from the new strategy in the near term, though.

Facebook is also seeing increased engagement while Twitter's engagement is falling. Facebook reported that the average time spent per user across Facebook, Instagram, and Messenger increased above 50 minutes in the first quarter and increased double digits year over year in the second quarter.

comScore data suggests U.S. users are spending just one minute on Twitter on the average day. Earlier this year, Morgan Stanley analyst Brian Nowack released a note saying Twitter's user engagement is still in decline despite already being the lowest among its peers in time spent per user.

With a growing audience that's increasingly engaged, along with several products with the promise for additional revenue growth, Facebook is in an enviable position. Twitter, meanwhile, is struggling to hold on to users and is desperate to turn around engagement levels with the users who do stick around as they're pulled toward Snapchat or Instagram or whatever the newest mobile app is.

It's no surprise then that in my eye, Facebook is the better buy, despite its high valuation.

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.