The lights have never shined so brightly -- and negatively -- upon social media stocks. In light of the ongoing revelations about Russian interference in the 2016 presidential election and the Cambridge Analytica scandal, many are wondering what the future for social media companies looks like.

Today we'll run two of the most important social media platforms -- Facebook (NASDAQ:FB) and Twitter (NYSE:TWTR) -- through the ringer. Both stocks have suffered over the past two weeks, but is one a better buy than the other at today's prices?

A person looking at a smartphone, overlaid with floating ones and zeroes.

Image source: Getty Images.

That, of course, is impossible to answer with 100% certainty. But by looking at the question through three different lenses, we can get a better idea of what we're getting when we pay for shares. Here's how they stack up.

Financial fortitude

Let's start with the most basic and straightforward dynamic -- financial fortitude. A company's balance sheet and cash flow statement can tell us a lot about what would happen to a company if a major crisis hit right now. If a company has lots of debt, little cash, and negative free cash flow, it's vulnerable to economic disruption. Even a hiccup in the economy could drive it into bankruptcy.

If a company has roughly equal parts cash and debt, as well as moderate levels of free cash flow relative to its size, then it's largely robust. In the long run, it will emerge from a downturn unscathed.

But there's a third category of organizations that have enormous war chests, little-to-no debt, and healthy free cash flow. Over the long run, such companies actually benefit as the result of macroeconomic crises by buying back shares on the cheap, acquiring start-ups at a discount, or simply bleeding out the competition by undercutting them on price.

Here's how Facebook and Twitter stack up in those respects -- keeping in mind that Facebook is valued at 20 times the current market capitalization of Twitter.

Company Cash Debt Free Cash Flow
Facebook $42 billion $0 $17 billion
Twitter $4.4 billion $1.7 billion $670 million

Data: Yahoo! Finance, SEC filings. Cash includes long- and short-term investments. Free cash flow presented on trailing-12-month basis.

Twitter's balance sheet is nothing to scoff at. It has a strong war chest, manageable debt, and healthy cash flows. That's enough to make it "robust."

But Facebook's overall situation is one of the most enviable in the world: tens of billions in cash, tens of billions of free cash flow, and absolutely no long-term debt. That makes the company in a great position to take advantage of macroeconomic crises.

Winner = Facebook.

Valuation

Next we have a murkier variable: valuation. There's no one number we can look at to know if a stock is "cheap" or "expensive." Instead, I like to put together a few different metrics to fill out a more holistic picture. Here are three of my favorites.

Company P/E* P/FCF PEG Ratio
Facebook 30 27 0.9
Twitter 71 34 2.7

Data: Yahoo! Finance, E*Trade. *P/E (price-to-earnings ratio) presented using non-GAAP (generally accepted accounting principles) earnings figures.

Again, on virtually every metric, one company comes out ahead -- Facebook. Not only is the company cheaper on valuations relative to earnings and free cash flow, but even when growth is factored in (via the PEG ratio), Facebook trades at a 65% discount to Twitter!

Winner = Facebook.

Sustainable competitive advantages

Nothing is more important to evaluate -- or difficult to discern -- than a company's sustainable competitive advantages. In investing circles, this is often referred to as a company's "moat." Simply put, a moat is what keeps customers coming back year after year while holding the competition at bay for decades. Both Facebook and Twitter benefit from the same moat -- strong network effects.

For social media companies, this is pretty easy to understand: With each additional user of Facebook or Twitter, the platform becomes more valuable for potential future users. Think about it: Who would join a social media platform if no one else was on it? Therefore, each incremental addition adds value to the platform.

Crucially -- from a business perspective -- this means that each company can collect more data that it can use to draw in advertisers. 

If this article had been written six months ago, Facebook would have won, hands down. In its most recent quarter, Facebook -- which also owns Instagram and WhatsApp -- added over 230 million active monthly users at the end of 2017, up 14% annually. At the same time, Twitter's numbers grew a more modest 4% -- though that included the negative effects of false accounts being deleted.

And yet, in the face of all the negative publicity surrounding Facebook and the hint of government regulation in the arena, I now have to call this a draw. Perhaps after six months have passed, two quarters of results have been reported, and the specter of regulations has come into focus, we can reevaluate this call. But for now, it's a draw.

Winner = Tie.

My winner is...

So there you have it -- Facebook remains on top, though the world's largest (by users) social media company's moat appears narrower than at any point in recent history, and Twitter's seems to be growing. Bearish prospects have pushed Facebook's stock significantly lower recently, but a powerful balance sheet acts as an important backstop.

Brian Stoffel owns shares of Facebook and Twitter. The Motley Fool owns shares of and recommends Facebook and Twitter. The Motley Fool has a disclosure policy.