Profit excluding some items was 57 cents a share, compared with analysts' prediction for 52 cents. Net income rose to $896 million from $806 million.
Founder and Chief Executive Officer Mark Zuckerberg had $2.4 billion added to his fortune in the first 15 minutes of trading on Thursday, given him a net worth of $47.8 billion. He is the eighth-wealthiest person on the planet, according to the Bloomberg Billionaires index. Co-founder Dustin Moskovitz gained $500 million, putting his fortune at $10.7 billion. Sean Parker, Facebook's original president, gained $390 million. He is worth $7 billion. The wealth of Chief Operating Officer Sheryl Sandberg rose $38 million to about $1.3 billion.
Facebook has been working to improve the quality - and therefore the price - of ads as Zuckerberg invests in newer initiatives, from WhatsApp to scientific projects such as virtual reality and artificial intelligence. Zuckerberg said that although virtual reality is an exciting investment area for the company, he expects it to grow slowly. David Wehner, Facebook's chief financial officer, said the company would continue to spend on virtual reality, artificial intelligence and other moves to prepare for the future, especially as the main business remains strong.
"We are investing aggressively in the future," the CFO said in an interview after earnings were announced. "We see great opportunities."
Facebook now has 12,000 employees, after adding 1,000 in the past quarter. Sandberg, the operating chief, is aiming for the social network to have a large impact in U.S. elections next year, adding that every member of Congress has an account.
The company is seeking to convince advertisers that it has the most comprehensive marketing products and tools for reaching potential customers on their mobile phones.
Because people sign into Facebook using their real identities, the company is better able to track and target them, boosting its appeal to marketers. By bringing Instagram into Facebook's advertising system, the company was able to expand the ad audience by more than 400 million users.
Facebook has more than 900 million users on WhatsApp and more than 700 million on Messenger. The company has been experimenting with ways to get people to interact with brands on Messenger. Neither of those properties is delivering a meaningful boost to revenue, and Wehner said building a business is not a priority.
Facebook is expected to account for 17.4 percent of global mobile-ad spending this year, a market that's projected to reach $72.1 billion in 2015, according to EMarketer. That compares with the researcher's projection for Google Inc. to reach 33.7 percent in 2014.
Zuckerberg said the company is working to improve users' experience on Facebook by working with media companies to make their content easier to consume in small bites.
Facebook worked with media companies on an "instant articles" product earlier this year, so their news stories load faster. On Friday, the company unveiled an agreement with Apple and Spotify to let people share 30-second preview clips of songs on Facebook.
People who click on the iTunes songs will be able to buy them through Apple.
The company makes a lot more money from its users in the U.S. and Canada than it does elsewhere. On average, revenue per user was $10.49 in the U.S. and Canada, compared with $1.39 in Asia-Pacific.
Although Facebook is blocked in China, it's one of the company's biggest advertising markets because exporters there are looking for ways to reach customers outside of the mainland, according to Zuckerberg. Still, he said he's dedicated to entering China eventually.
"You can't have a mission of connecting the world and leave out the biggest country," Zuckerberg said. "That is a situation we are going to need to find a way forward on."