The language people use on Twitter can be used to work out how lonely they are, scientists have revealed.
This could be important, as loneliness affects one in five adults and is linked to depression and cardiovascular disease.
Researchers from the University of Pennsylvania School of Medicine analysed the language used in Tweets by lonely people.
They found that people who Tweeted about loneliness were also likely to Tweet about mental health concerns and things like relationship issues, substance abuse and insomnia.
The findings, published in BMJ Open, could make it easier to identify Twitter users who are lonely, and provide support for them, even if they don't explicitly tweet about feeling alone.
Lead author Dr Sharath Chandra Guntuku, a research scientist in Penn Medicine's Centre for Digital Health, said: "Loneliness can be a slow killer, as some of the medical problems associated with it can take decades to manifest.
"If we are able to identify lonely individuals and intervene before the health conditions associated with the themes we found begin to unfold, we have a chance to help much earlier in their lives.
"This could be very powerful and have long-lasting effects on public health.
"On Twitter, we found lonely users expressing a need for social support, and it appears that the use of expletives and the expression of anger is a sign of that being unfulfilled.
"Moving forward, we will need to test this in order to determine if one may cause the other. Does loneliness cause anger, or vice versa?"
Co-author Rachelle Schneider said: "Social media has the potential to allow researchers and clinicians to passively measure loneliness over time.
"Through validating our data, we can develop a reliable and accurate tool to do this monitoring."
Focusing on Twitter users in Pennsylvania with publicly accessible accounts, the team found that over 2,000 people had tweeted the words 'lonely' or 'alone' more than five times between 2012 and 2016.
Comparing those users to the Twitter timeline more widely revealed that 'lonely' users tweeted nearly twice as much as others, and were much more likely to do so at night.
Tweeters who posted about loneliness were also much more likely to post content associated with anger, depression and anxiety.