MENLO PARK, Calif. - Facebook is on a roll. The world's largest online social network posted sharply higher earnings on Wednesday as revenue from mobile advertising continued to grow, and more people used it, more often.

The company's shares climbed nearly 4 per cent in extended trading after the results came out, signalling that they could hit a record high when the stock market opens on Thursday. Investors who bought -- and held on to -- Facebook stock during the company's initial public offering two years ago are now close to doubling their money.

Facebook Inc. (FB) said Wednesday that it earned $788 million, or 30 cents per share, in the April-June period. That's up from $331 million, or 13 cents per share, in the same quarter a year ago.

Adjusted earnings were 42 cents per share, handily beating Wall Street's expectations of 33 cents, according to a poll by Zacks Investment Research.

Facebook's revenue jumped 61 per cent to $2.91 billion from $1.81 billion in the same quarter a year ago. Analysts expected $2.8 billion. This was the fifth quarter in a row that Facebook beat Wall Street's forecasts.

Advertising revenue jumped 67 per cent to $2.68 billion. Mobile ad revenue, a closely watched figure, was 1.66 billion, or 62 per cent of Facebook's total advertising revenue for the quarter. In the first three months of the year, mobile ads accounted for 59 per cent of Facebook's total ad revenue.

The steady increase indicates that Facebook is succeeding in steering advertisers to its mobile platform at a time when most of its users are using mobile devices to access the social network.

Facebook had 1.32 billion active users at the end of June, up 14 per cent from a year earlier. On average, 829 million people used Facebook every day in June, up 19 per cent from a year earlier. The number of people who log in at least once a day on mobile devices was 654 million on average in June, up 14 per cent from a year earlier.

"We had a good second quarter," said CEO Mark Zuckerberg in a statement. "Our community has continued to grow, and we see a lot of opportunity ahead as we connect the rest of the world."

Facebook has been growing its share of the worldwide digital advertising market, but it's still a long way from catching up to rival Google Inc. In 2013, Facebook had a nearly 6 per cent share of the market compared with Google's 32 per cent according to research firm eMarketer. This year, Facebook is expected to grow its slice to nearly 8 per cent, while Google's should decline slightly, to just below 32 per cent.

Facebook's stock jumped $2.77, or 3.9 per cent, to $74.06 in extended trading after the results came out. The stock had closed up $2.02 at $71.29.

Shares of the Menlo Park, California-based company have climbed $16.64, or 30 per cent, to $71.29 since the beginning of the year, while the Standard & Poor's 500 index has climbed 7.5 per cent. The stock has more than doubled in the last 12 months.