Until Thursday, Facebook was enjoying enormous gains. The stock was up more than 23 percent for the year, before it reported earnings after Wednesday’s close. By Thursday afternoon, all of its gains for the year had vanished.

It was the details of Facebook’s report that seemed to spook investors. The company’s quarterly revenue fell slightly short of meeting the expectations of Wall Street analysts. And executives warned that the company would invest heavily in privacy and security, and that revenue growth would most likely slow in coming quarters.

[Read more about the accumulation of issues Facebook said is starting to hurt its multibillion-dollar business.]

Still, Facebook’s sharp drop seems to have had a limited effect on the broader market, which has shown signs of gaining traction in recent weeks as companies largely reported strong second-quarter earnings.

On Thursday, the S.&P. 500 was down only slightly, despite Facebook’s tumble. Other large tech firms didn’t take any cues from Facebook: Alphabet shares rose 0.8 percent and Apple slipped only 0.3 percent. Amazon fell 3 percent, but recovered those losses after hours on Thursday after issuing a strong quarterly earnings report.

The S. & P. 500 fell just 0.3 percent Thursday, to 2,837.44, while the Dow Jones industrial average rose 0.4 percent to 25,527.07. The tech-heavy Nasdaq Composite index was the hardest hit by Facebook’s tumble, dropping 1 percent to 7,852.18.

The S. & P. 500 is up more than 6 percent this year despite trade tensions surrounding the United States and its largest trading partners and the Federal Reserve’s increases in interest rates. The index ended Thursday only about 1 percent below its high hit on Jan. 26.