Facebook (META -10.56%) and Twitter (TWTR) are two of the most prominent players in the social media space. Facebook is the global leader, with over 2 billion monthly active users on its flagship platform, but the relatively small Twitter still has a meaningful impact in news, politics, live events, sports, and viral memes.

Their stocks have both performed fairly well this year. Facebook shares are up over 30% from the beginning of the year, and Twitter's stock price is up more than 10%. But Twitter shares only spiked after it showed signs of life with its first-quarter results, while Facebook has moved steadily higher throughout the year.

Can Twitter keep up the momentum it generated in the first quarter, or does Facebook's steady expansion toward world dominance make it a better buy?

Close up on a person's hands using a smartphone

Is this person on Facebook or Twitter? Image source: Getty Images.

Finding room for growth

Facebook's days of mammoth revenue growth may be over for now, as CFO Dave Wehner warned analysts last year the company is facing ad load saturation on its flagship product. It will lap the period of increasing ad loads starting in the third quarter, which ought to put pressure on the company's revenue growth. Indeed, analysts expect revenue growth to slow to 37% next quarter from 56% last year. They also expect revenue growth to slow to 28% next year.

Facebook is still doing better than Twitter, though. The company saw its first ever year-over-year sales decline in the first quarter. But Twitter's user growth spiked in the first quarter, particularly in the United States, and daily users increased 14% year over year. COO Anthony Noto warned at the beginning of the year it may take some time for that increased user growth to translate into revenue growth since the majority of its advertisers are big brands that only lay out ad budgets every six to 12 months.

But Twitter isn't even standing still, particularly from an average revenue per user angle. ARPU declined to $1.69 in the first quarter from $1.93 in the same period last year. By comparison, Facebook generated ARPU of $4.23 in the first quarter, up 27% from $3.32 last year. That's despite the vast majority of its new users coming from the lower-value regions like Asia-Pacific.

Both Twitter and Facebook are investing heavily in video content, seeing it as a way to increase engagement as well as ad revenue. Video ads typically carry higher value than other display ads, so they can potentially increase average ad prices and the revenue per minute of engagement on each platform. Twitter is particularly invested in video ads after de-emphasizing its other display ad products.

While both companies are facing headwinds for growth, Facebook appears to be handling them much better than Twitter.

A look at valuation

Even with better growth prospects, investors need to be sure they're not paying too much for Facebook.

Compared to Twitter, Facebook has a very high valuation based on its revenue alone. Facebook trades for nearly 15 times sales while Twitter trades for closer to 5.

Considering, however, that Facebook is still growing revenue while Twitter struggles to turn things back around, the company certainly deserves a higher multiple. If you look back three years ago, when Twitter was growing revenue rapidly, it traded for a similar price-to-sales ratio as Facebook.

But if you look at earnings, Facebook is even more attractive compared to Twitter. Facebook's price-to-earnings ratio is 38.5 and just 30 on a forward-looking basis. Twitter shares trade for around 60 times forward earnings estimates. Given that analysts expect Twitter's earnings to grow at a slower pace than Facebook's, Twitter shares are extremely expensive compared to Facebook's.

Not only is Facebook doing a better job of growing its revenue despite the headwinds it faces, but it's turning that revenue into solid earnings growth. And with a forward P/E ratio about half of Twitter's, that makes it a better buy for investors.