The social media giants say they have shut down hundreds of accounts linked to Russia and Iran.