After years of facing accusations that Facebook Inc.  (FB) - Get Report was among the social media giants unwittingly used as tools in an attempt to sway the 2016 presidential election, the tech company has set up a "war room" at its California headquarters to combat misinformation and fake accounts, according to a press statement.

The effort - two years in the making - will be used to boost security and quash misuse of the site as campaigning heats up for the November midterms elections, according the statement posted Thursday, Oct. 18, by Samidh Chakrabarti, director of product management and civic engagement.

Built on analyzing threats in the moment, the war room is composed of "threat intelligence, data science, software engineering, research, community operations and legal teams" and taps the resources of the company's 20,000 employees working on safety and security, according to Chakrabarti.

The effort would stomp out fake accounts and false news, said Chakrabarti.

"The work we are doing in the war room builds on almost two years of hard work and significant investments, in both people and technology, to improve security on Facebook, including during elections," he said, noting the war room also relies on machine learning and artificial intelligence technology that can help block or disable fake accounts.

Shares of Facebook fell 2.6% on Thursday. 

Facebook is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells FB? Learn more now.