Facebook Inc beat Wall Street's revenue targets as its mobile advertising business gains steam and the Internet company reported a rise in the number of users who visit its online social network every day.
Shares of Facebook jumped 20 percent to $31.81 in afterhours trading on Wednesday.
The world's No. 1 social network said roughly 700 million of its 1.15 billion users now visit the service on a daily basis, compared with 665 million at the end of the first quarter.
The increase comes despite worries that traffic to Facebook may suffer amid competition from a new crop of mobile services popular among a younger crowd, such as Snapchat and WhatsApp.
"The company is successfully making the transition to mobile and new ad formats are working really well. Facebook's ad exchange works really well," said Sterne Agee analyst Arvind Bhatia.
"Engagement is fairly strong still, so it doesn't sound like anyone is really being turned off by these extra ads."
Facebook grew revenue 53 percent to $1.813 billion in the second quarter, above the average analyst expectation of $1.618 billion, according to Thomson Reuters I/B/E/S. Facebook had $1.184 billion in revenue in the year ago period.
The company said that mobile ads accounted for roughly 41 percent of its total ad revenue in the second quarter, up from 30 percent in the first quarter of the year.
The world's No.1 online social network said it earned $333 million in net income, or 13 cents a share, versus a net loss of $157 million, or 8 cents a share, in the year ago period.
Excluding share-based compensation and related payroll tax expenses and income tax adjustments, Facebook said it earned 19 cents a share.