Facebook reported earnings and revenue that beat estimates in the second quarter on Wednesday, thanks to its robust mobile ad business.
The social media network said it has 1.5 million active advertisers, up from 1 million last June.
"Strong performance across the board shows personalized marketing at scale is working," said Sheryl Sandberg, COO of Facebook. She added that Instagram is "seeing great results" in advertising but is "still taking it really slow."
The company posted earnings of 42 cents a share, excluding one-time items, on revenue of $2.91 billion, a growth of 61 percent from the same quarter last year. Shares turned higher to hit an all-time high in extended hours trading after an initial decline following the results. (Click here to get the latest quotes for Facebook.)
Analysts had expected the company to report earnings excluding items of 32 cents a share on $2.81 billion in revenue, according to a consensus estimate from Thomson Reuters.
Total daily active users increased 19 percent year-over-year, while mobile daily active users grew by nearly 40 percent year-over-year, totaling more than 650 million on average for June 2014, the company said in a release.
"What's happening here is advertisers are getting a good yield and a good return on investment with mobile ads," said Martin Pyykkonen, senior research analyst at Rosenblatt Securities. "So they're working from the advertisers' side."
Revenue from advertising was $2.68 billion, a 67 percent increase from the same quarter in 2013, the firm said. Mobile advertising, which accounted for 62 percent of advertising revenue for the quarter, grew 30 percent from last year.
"We had a good second quarter," said Mark Zuckerberg, Facebook founder and CEO. "Our community has continued to grow, and we see a lot of opportunity ahead as we connect the rest of the world."
Mark Hawtin of GAM called Facebook's results "exceptional."
"The financials are really strong across the board. For me, what was really important was they had a beat on advertising," he said on CNBC's "Closing Bell." "That's what really was needed to drive the shares higher."