Facebook's stock is seeing its biggest single-day gain since it began trading in May — a sign that the social media company's complicated relationship with Wall Street has finally hit a bright spot.

It's been a rough five months, and it's too early to tell whether investors' optimism is here to stay. But on Wednesday they latched on to clear signs of growth in the company's third-quarter earnings report. Several analysts upgraded the stock.

Besides posting quarterly results that inched past Wall Street's expectations, Facebook also gave details for the first time on how much money it made from mobile ads. This has been a concern since before its initial public offering. Although the majority of 1 billion people who use Facebook each month now access it using a mobile device, the 8-year-old company was created in the age of desktop computers, for Web pages. Facebook now calls itself a "mobile-first" company, but it only started showing mobile ads earlier this year.

On Tuesday, Facebook said that nearly $153 million of its $1.26 billion revenue came from mobile advertisements. The rate of advertising revenue growth also accelerated since the second quarter.

Shares of based Facebook Inc., based in Menlo Park, Calif., rose $4.34, or 22.3 percent, to $23.84 on Wednesday. It's by far the stock's biggest one-day gain since Facebook went public on May 18. The stock is still down 37 percent from its $38 initial public offering price.

In his upgrade of Facebook, Citi Investment Research analyst Mark Mahaney said that for the first time since the IPO, investors see a reasonably priced stock combined with accelerating growth at the company. He raised his rating to "Buy" from "Neutral" and increased his target price to $35 from $30.

The analyst noted that advertising revenue grew at a faster pace at Facebook at a time when rival Google Inc. saw a slowdown. Google surprised investors last week with weaker-than-expected earnings report that showed its ad revenue growing at the slowest pace in three years.

Tuesday's strong report doesn't mean that Facebook is out of the woods. The company has looming expiration dates for lock-up periods that have prevented most employees from selling their shares. If shares flood the market as the lock-ups expire later this month, on Nov. 14 and on Dec. 14, Facebook's stock price could decline once again.