The social media giant said Friday on its security blog that the company discovered in January that its system had been targeted in a sophisticated attack. A handful of the company's employees visited a developer's website that had been compromised, which led to malware being installed on the Facebook employee laptops.
Facebook says it has found no evidence that user data was compromised.
The company has fixed the infected machines, informed law enforcement and has an investigation of its own under way. Facebook also says it was not the only company targeted in the attacks but was one of the first to discover it.
"We are working continuously and closely with our own internal engineering teams, with security teams at other companies, and with law enforcement authorities to learn everything we can about the attack, and how to prevent similar incidents in the future," the company said on its website.
Facebook shares fell 18 cents to close at $28.32 and dropped another 7 cents in after-hours trading.