Spanish Prime Minister Pedro Sanchez says he wants the European Union to push to scrap anonymity on social media platforms.