The Spanish government is weighing a ban on social media for children, following similar moves by Australia and France.