The Australian legislation could set a global precedent as other countries consider measures to regulate children's social media use.