Thank you for being such a good friend, read the text message on Juliana Borges’ phone. I know you’re going to do well in life.

Borges, then an 18-year-old senior at Lake Stevens High School, looked at the words, smiled and went on with her evening. She wondered at the silence when she typed back her appreciation but thought nothing of it until the next morning in Spanish class, when she learned that her friend had killed himself that night.

Today, only three years later, their exchange likely would have taken place on Twitter, Facebook or Tumblr — social-media sites whose use has skyrocketed among teens and where messages are often open to the world, for all to see.

In the hours and days after five students at Marysville-Pilchuck High School were shot by a friend, who then turned the gun on himself, updates from teens flooded Twitter — everything from rumors to news tidbits to outpourings of emotion.

The shooter’s Twitter feed, too, was viewable, and it displayed a simmering angst in 15-year-old Jaylen Fryberg that went back months, filled with anger and vows of retribution — despite the fact that, in person, he was popular enough to be crowned homecoming prince of the freshman class.

And within a day of the assault, victim Shaylee Chuckulnaskit, 14, had more than 3,000 people following her Twitter account, even as she lay in a hospital, fighting for her life. She died from her injuries on Friday.

The surging popularity of social media among teens has not been lost on public-health advocates, who are now working with Facebook to reach students in trouble.

They say many young people are far more comfortable facelessly typing their pain on a keyboard and hitting “send” than walking into a counselor’s office to ask for help directly.

Fryberg’s tweet on June 20 could be a prime example: “Might as well die now,” he wrote.