This is exactly right.
A person considering suicide usually doesn't announce to the world that they're thinking about it. They know their friends will all say the same "don't do it" lines, and some jerk will try to tell them that they just need a hug, and someone else will point out all the trivial good things they have in their life, which will just make them feel guilty for being depressed. Then there are the assholes, who are quick to point out how cruel the "real world" is, and in doing so they communicate that the person doesn't meet their high standards for living in their precious "real world", further reinforcing the depression.
Fortunately, it's hard to hide depression from a trained eye (or a trained algorithm). Writing styles change significantly with one's mood, often in consistent ways (on a per-person basis). If someone tends to write shorter posts and use stronger language when their depression worsens, it becomes a useful gauge for knowing how they're doing without asking. Interests often change as well, and especially criticisms. If a person stops caring about their adorable newborn cousin and starts obsessing about the size of their various body measurements, it may be cause for concern.
The other thing to note is that depression is a chronic condition. A quick post about how bad your day was isn't as alarming as a series of posts over the last few months saying that you just consistently feel melancholy. It can be described metaphorically as the brain being addicted to sadness, and the detection is similar. One night drinking too much doesn't qualify as an alcoholic, and a trip to Las Vegas doesn't make one a compulsive gambler. Rather, it's a long-term trend in bahavior, and again, an algorithm can easily detect that trend, where friends will likely only see the short-term changes. Friends are also likely to dismiss their concerns by rationalizing, considering it reasonable to be so upset, because of some bad thing that has happened recently.
Attention is the second best thing to help a person with depression. The best is to go beyond mere attention, and offer support. Detach the worthwhile person from their degrading affliction, and show that you care for them. Treat the depression as one would a broken leg or a bad cough. It gets in the way, but it's not the defining quality of the person. That distinction, once accepted, is the first step to recovery. Just like with an addiction, there are good days and there are bad days, but the slow progress eventually bears fruit.