Facebook capped a tumultuous 2020 with soaring earnings in the final quarter, its user base boosted by people staying home and its revenue buoyed by a shift to digital advertising amid the pandemic.

But the company predicted uncertainty for 2021 and said its revenue in the latter half of the year could face significant pressure. Because revenue grew so quickly in the second half, the social network could have trouble keeping up that pace.

“We had a strong end to the year as people and businesses continued to use our services during these challenging times,” said Mark Zuckerberg, Facebook founder and CEO. “I’m excited about our product roadmap for 2021 as we build new and meaningful ways to create economic opportunity, build community and help people just have fun.”

However, Facebook also is facing challenges in how it targets advertisements, including Apple’s coming launch of privacy protections that could limit Facebook’s ability to target ads.

Facebook earned $11.22 billion, or $3.88 per share, in the October-December period, well above the $3.19 that analysts expected and up 53% from a year earlier. Revenue grew 22% to $28.07 billion, higher than the $26.36 billion analysts were predicting, according to a poll by FactSet.

Its monthly user base grew 12% to 2.8 billion. Facebook ended 2020 with 58,604 employees, a 30% increase from a year earlier.

Shares of the Menlo Park, California-based company slipped about 2% in after-hours trading to $268.98.