Facebook delivered fourth-quarter results above Wall Street's expectations and sought to show that it has finally transformed into a "mobile company."

Its stock price fluctuated sharply in after-hours trading as investors weighed lower net income and growing expenses against an increasing user base and higher advertising revenue.

Facebook, the world's largest social media company, said it earned $64m, or 3 cents per share, in the three months from October to December.

That is down from $360m, or 14 cents per share, a year earlier when Facebook was still a privately held company. 

Revenue for the fourth quarter rose 40% to $1.59 billion from $1.13 billion. 

Excluding special items, mainly related to stock compensation expenses, California-based Facebook earned 17 cents per share in the latest quarter. 

Analysts had expected lower adjusted earnings of 15 cents per share on revenue of $1.51 billion.

"We enter 2013 with good momentum and will continue to invest to achieve our mission and become a stronger, more valuable company," chief executive Mark Zuckerberg said in a statement.

Facebook's biggest challenge lies in mobile devices. Most Facebook users access it using a mobile phone or tablet computer, yet the nine-year-old company only started showing mobile ads about nine months ago.

"I think more people are starting to understand mobile is a great opportunity for us," Zuckerberg told analysts in a conference call. " It allows us to reach more people, we have more engagement from the people we reach and I think we will be able to make more money for each minute people spend with us on mobile devices,'' he added.

Facebook has been trying to squeeze in more mobile adverting without alienating users who are more interested in conversing with their friends than being subjected to a marketing blitz. The company appears to be striking the right balance so far, based on the number of people still regularly using the mobile apps, analysts noted.

Facebook said it generated 23%, or $306m, of advertising revenue from mobile, up from 14% in the third quarter, the first time it disclosed such information.

While Facebook's accelerated revenue growth is a positive sign, there is still a feeling that the company could be doing even more to mine revenue from its mobile audience, analysts said. They had expected Facebook's mobile ad revenue to rise to 25% of the company's ad sales or about $350m in the fourth quarter.

Facebook's monthly user base grew 25% from a year earlier to 1.06 billion accounts. About 680 million of them access Facebook using a mobile device each month.

Facebook's stock floated around $31 in afternoon trading following the third quarter results, well below its initial public offering price of $38.

The May 18 IPO was by far the biggest one for an Internet company since Google's in 2004, but the excitement quickly deflated.