Facebook surpassed expectations on all fronts in the second quarter, growing not just profit and revenue but its already-massive user base, mobile advertising and usage of its "family" of non-Facebook apps like Instagram and WhatsApp.

Even so, its stock price fell after the results came out, as some investors may have been looking for even better results, or they may be simply cashing in on some profits as Facebook's shares have been trading near record highs. Spending also soared in the April-June period, as Facebook had promised it would.

The world's largest online social network said Wednesday that it had 1.31 billion people monthly mobile users as of June 30, up 23 percent from a year earlier. It reached 1.49 billion monthly users, up 13 percent from a year earlier. Facebook also had 968 million daily active users overall and 844 million on mobile devices.

"Once again Facebook has proven its ability to attract and retain users. It's particularly impressive that users are more engaged than ever before — that the percentage of monthly users who visit every day continues to grow," said Forrester Research analyst Nate Elliott.

That's in contrast to Twitter, which continues to worry investors with stalling user growth.

Facebook's mobile advertising represented 76 percent of the total advertising revenue during the April-June period, proof that the company continues to attract advertisers to where its users are — on smartphones and other hand-held gadgets. That's up from 62 percent a year earlier.