The law is an attempt to combat the dangers posed to children on social media.