The company reported $6.44 billion in revenue, according to a release posted at the end of the trading day. Analysts expected Facebook to earn $6.02 billion. The boost was due to strong user engagement and dominance in mobile and digital advertisements.

The company reported 1.71 billion users. Daily active users were 1.13 billion on average for June 2016, amounting to a 17 percent increase year over year. Mark Zuckerberg said Facebook will now focus on expanding the community.

"We have five billion people left to connect," Zuckerberg said. "The biggest thing we can do to help people and grow the business is to focus on improving and expanding this already dynamic and large community we have using the Facebook app."