If Facebook were a car, it just went from zero to 100km/h in six seconds.
The social networking company revealed this week that it had revved up its mobile advertising from virtually nothing a year ago to 41 per cent of its total ad revenue of $US1.6 billion ($1.7 billion) in the second quarter.
"Soon we'll have more revenue on mobile than desktop," Facebook's founder and chief executive, Mark Zuckerberg, said in a conference call with analysts.
Facebook's results elated investors, who sent the company's stock up nearly 17 per cent, to $US30.94, in after-hours trading.
Analysts said the strong performance dissipated lingering worries that the company could not adapt to the current internet environment, in which users are relying more on mobile devices instead of personal computers to access the information they want.
Those concerns have dogged the company since its disappointing initial public offering in May, 2012, in which it sold shares at $US38 and then saw them fall by half.
"One of the biggest overhangs from their IPO is that this company had been blindsided by mobile," RBC Capital Markets analyst Mark Mahaney said. "They caught up. Instead of being behind the curve on mobile, they are ahead of the curve."
The company said it had net income of $US333 million, or 13¢ a share, in the second quarter. Excluding stock-based compensation expenses, profits were $US488 million, or 19¢ a share, compared with $295 million, or 12¢ a share, in the second quarter a year ago. The company's revenue soared 53 per cent, to $US1.81 billion.
Facebook had particularly strong demand for ads that appear in its users' news feeds, the flow of updates from friends that they see when they log on. About one in 20 posts in the news feed is an ad, and advertisers cannot seem to get enough of them.
The company expects those ads to continue to grow in the second half, chief financial officer David Ebersman said in a conference call with analysts.
One concern for the future is whether Facebook will annoy its users if it significantly increases the number of ads in news feeds, said Debra Aho Williamson, an analyst with research firm eMarketer.
"How many ads will people tolerate?" she asked.
Mr Zuckerberg said Facebook's studies had shown users were noticing ads more, and the company was working to improve the quality and relevance of the advertising.