Egypt’s parliament has passed a law giving the state powers to block social media accounts and penalize journalists held to be publishing fake news.