Instagram and Facebook parent Meta Platforms Inc. posted better-than-expected results Wednesday for the first quarter thanks to strong advertising revenue — boosted by artificial intelligence tools — on its social media platforms.

Meta’s stock climbed in extended trading after the results came out.

It was a “a good quarter for Meta, but it was before the economic turmoil really kicked in and before the seesaw of the tariffs began,” said Sonata Insights chief analyst Debra Aho Williamson. “It was also before we started to see pullbacks in ad spending from China-based advertisers like Temu and Shein.”

Going forward, she added, Meta should be able to withstand any revenue shortfall from advertisers from China if it can continue to improve its AI-driven advertising tools.

The company earned $16.64 billion, or $6.43 per share, in the January-March period, up 35% from $12.37 billion, or $4.71 per share, in the same period a year earlier.

Revenue rose 16% to $42.31 billion from $36.46 billion a year earlier.

Analysts, on average, were expecting earnings of $5.23 per share on revenue of $41.34 billion, according to a poll by FactSet.

For the current quarter, Meta forecast revenue in the range of $42.5 billion to $45.5 billion. Analysts are expecting $43.84 billion.

The Menlo Park, California-based company also raised its capital expenditures estimate for 2025 to $64 billion-$72 billion, up from its prior outlook of $60 billion-$65 billion. Meta said the new guidance “reflects additional data center investments to support our artificial intelligence efforts as well as an increase in the expected cost of infrastructure hardware.”

“We’ve had a strong start to an important year, our community continues to grow and our business is performing very well,” CEO Mark Zuckerberg said in a statement. “We’re making good progress on AI glasses and Meta AI, which now has almost 1 billion monthly actives.”

He said in a conference call with analysts that the company is in a good position to navigate the ongoing economic “uncertainty.”

Zacks Investment Research analyst Andrew Rocco said that while many companies have not been providing guidance amid tariff concerns and an uncertain economic environment, the fact that Meta did is a “bullish sign.”

Meta said more than 3.4 billion people, on average, used at least one of its apps in March. That’s up 6% from a year earlier.

On Tuesday, Meta released a standalone AI app, called Meta AI, that includes a “discover” feed that lets users see how others are interacting with AI.

Meta shares jumped $24.20, or 4.4%, to $573.20 in after-hours trading. The stock is down about 8% year-to-date.