Teenagers' mental health can be put at risk by constant pressure to post on social media, a study has found.