By Jeff Horwitz

Facebook Inc. posted record revenue in the third quarter as strong digital ad spending outweighed a high-profile ad boycott, data-gathering restrictions and continued fallout from the pandemic.

Revenue jumped 22% to $21.47 billion in the three months through September, Facebook said Thursday. The company projects that revenue will grow even faster during the fourth quarter, as the holiday season bolsters ad spending.

Looking past 2020, the company sounded less sanguine. Facebook finance chief David Wehner warned of a "significant amount of uncertainty" in the coming year. While the pandemic has accelerated the shift to online commerce in ways that will benefit Facebook longer-term, he said, the company faces significant regulatory threats as well as limitations on how it collects data from users of Apple Inc.'s products.

Among the regulatory challenges to Facebook's business, Mr. Wehner singled out an order by European regulators that would prohibit the transfer of European users' data back to the U.S. Facebook is appealing that decision.

Facebook also faces increased antitrust scrutiny, with staffers at the U.S. Federal Trade Commission recommending a lawsuit be filed against the company. The FTC has spent more than a year looking into complaints that Facebook has been using its powerful market position to stifle competition, part of a broader effort by U.S. antitrust authorities to examine the conduct of big technology companies.

The third quarter began on a difficult note for Facebook, with a boycott over its alleged failure to rein in hate speech on the platform. Civil-rights groups including the National Association for the Advancement of Colored People and the Anti-Defamation League convinced major advertisers including Verizon Communications Inc. and Unilever PLC to temporarily stop spending on Facebook's platforms, a halt that the company has said could weigh on its results.

Despite those challenges, Facebook's earnings per share climbed to $2.71 in the third quarter from $2.12 in the year-earlier period, beating analysts' average projection of $1.90, according to data from FactSet. Net income jumped 29% to $7.85 billion from $6.09 billion, due in part to a $913 million one-time tax deduction related to Facebook's R&D.

The company's operating margin stood at 37%, compared with 41% a year earlier, as head count rose by 32% over the past year to nearly 57,000. The number of people using Facebook products each month -- which include Instagram, Messenger and WhatsApp -- increased to 3.21 billion from 2.82 billion a year ago, up 14%.

Following the third-quarter report, Facebook's stock rose about 1% in after-hours trading. As of Thursday's close, Facebook shares had risen by more than 33% this year, with pandemic-driven surges in user growth and increased use of its platforms compensating for both the advertiser boycott and lower spending by Covid-beleaguered advertisers in retail, travel and entertainment.

Facebook's total user numbers grew in every market except the U.S., where the number of daily active users dropped to 255 million from 256 million in the second quarter. The company had warned that users would likely spend less time on the platform as coronavirus restrictions were lifted.

The company's nonadvertising revenue fell 7% from a year earlier to $249 million. The category includes Facebook's Oculus virtual reality business, which Mr. Wehner predicted would be stronger in the fourth quarter due to sales of its VR headset.

U.S. political advertising likely also provided a boost, with some analysts predicting the spending boom could account for a mid-single-digit percentage of Facebook's total revenue.

Write to Jeff Horwitz at Jeff.Horwitz@wsj.com

(END) Dow Jones Newswires

10-29-20 1825ET