Less than two years ago, disillusioned investors were fleeing Facebook Inc. stock, worried the company would never figure out how to make the leap to mobile devices from personal computers, let alone make money on them.
Now, more than half of the giant social network's advertising revenue is coming from ads for its 1.2 billion users on smartphones and tablets. And it's buying WhatsApp after outbidding rival Google Inc. for the most popular mobile app for sending messages on smartphones.
Facebook's big shift to wireless helped give Chief Executive Mark Zuckerberg top billing Monday at the Mobile World Congress in Barcelona, Spain, his highest profile yet at the industry's largest trade show.
"It took Facebook a while to recognize the shift to mobile but once they did, they turned on a dime," said David Kirkpatrick, author of "The Facebook Effect." "This was a victory lap for Facebook as a mobile company."
At the time of its initial public offering in May 2012, Facebook looked as if it might get left in the dust as consumers increasingly ditched their computers for mobile devices.
With its stock value plummeting, Zuckerberg had one challenge greater than all others: reinvent Facebook from its roots in personal computers into a company geared to the mobile generation. Results came quickly.
In last year's final three months, Facebook picked up more than half of its advertising revenue from its 945 million mobile users. And in a major move last week, it agreed to pay $19 billion in cash and stock for mobile messaging phenom WhatsApp, the tiny, 55-person company that provides a cheap, easy way for its 465 million users worldwide to send text messages and photos.
Despite the eye-popping price tag, Wall Street rewarded Facebook's chutzpah. Shares hit a high of $71.44 in midday trading Monday before closing at $70.78, up $2.19, or 3.2 percent. Facebook has gained 30 percent this year, giving it a market value of more than $180 billion.
Facebook hasn't just caught up in mobile. With WhatsApp, it could become an even more significant force in the wireless industry.
WhatsApp Chief Executive Jan Koum, also speaking at Mobile World Congress, said his company would begin offering voice calls this spring. The news sent shudders through the telecommunications industry, which lost $32 billion in revenue last year to companies offering free texting, according to research firm Ovum.
Device makers and wireless carriers need Facebook to drive more people to spend time and money on mobile phones. And they certainly benefit from skyrocketing demand for mobile data access. But the industry is growing collectively more concerned about Facebook's fast-growing footprint.
Zuckerberg, with author Kirkpatrick questioning him onstage Monday, cast himself as a partner, not a competitor, as he tried to enlist the telecom industry's help in bringing Internet access to the rest of the world.
The 29-year-old executive, dressed in T-shirt and jeans, used his time in the trade show spotlight to talk up his ambition to reach the next 5 billion Internet users, most of whom hail from developing countries and will experience the Internet only on a mobile device.
"In the U.S., you can dial 911 and get access to basic services," Zuckerberg said. "We want to create a similar kind of dial tone for the Internet."
In August, Facebook formed the Internet.org foundation, a coalition of companies that aims to make Internet access cheap and ubiquitous throughout the world.
The foundation announced new initiatives Monday to give students in Rwanda free online access to educational materials and to work toward bringing Internet access to rural Indian communities.
Facebook also said it would work with Swedish mobile phone and software maker Ericsson to create an Internet.org Innovation Lab on Facebook's campus in Menlo Park, Calif. Zuckerberg said he is seeking up to five more wireless carriers in emerging markets to help expand the Internet.org initiative this year.
"I want to show that this model works," he said. "That's why we're looking for partners who are serious about this."
Zuckerberg noted that he and Koum bonded over their common vision to "connect billions of people." WhatsApp, he said, is one of the rare Internet services poised to reach 1 billion users in the next few years.
"WhatsApp is the most engaging app we've ever seen on mobile. It blows everything else away," Zuckerberg said.
And at $19 billion, he said, WhatsApp was a bargain for Facebook.
"I actually think that by itself it's worth more than $19 billion," Zuckerberg said.
But S&P Capital IQ analyst Scott Kessler said it's unclear if the deal would stand the test of time.
"The two most obvious questions are: How sustainable is WhatsApp's growth, and how do you rationalize the sheer size and valuation of the deal?" Kessler said.
Still, most analysts remain bullish.
"WhatsApp and Internet.org both illustrate Facebook's (very) long-term goal of connecting people to each other," Macquarie Securities analyst Ben Schachter wrote in a research report.
"Neither of these projects are likely to be meaningful financial contributors in the near term," he said, "but both have the potential to generate transformative impacts over the long term."
Explore further: Mexico City proposes regulations for Uber