The study, carried out by researchers at Sahlgrenska Academy in Gothenburg and Lund University in southern Sweden, involved an analysis of Facebook status updates by 300 Americans, combined with personality tests.
"We looked at people's Facebook status updates and analyzed whether there was a relationship between the texts and people's personality traits," Lund University psychology professor Sverker Sikström told The Local.
The researchers first had the Facebook users answer a survey designed to test for a number of personality traits, including extrovert, narcissistic, psychopathic, or neurotic. Test subjects then submitted a selection of Facebook status updates that were analyzed with an algorithm developed by Sikström that measures the significance of words.
The researchers discovered that people's Facebook status could provide clues about their personalities.
"The status analyses could indicate which Facebook users demonstrated psychopathic and narcissistic personality traits in the personality tests," Danilo García, a researcher at the Centre for Ethics, Law and Mental Health at Sahlgrenska Academy, said in a statement.
He added that those with a psychopathic personality posted "negatively charged or odd formulations more often", including entries about prostitutes, decapitation, pornography and butchers.
Sikström added he and García were surprised that Facebook only seemed to be able reveal the "dark" psychopathic, narcissistic or Machiavellian personality traits.
"That was an interesting result, that the method only predicted these dark traits, but not the big five," he said, referring to the five broad personality traits of openness, conscientiousness, extraversion, agreeableness, and neuroticism.
The study, entitled the Dark Side of Facebook and published in the scientific journal Personality and Individual Differences, also found how many Facebook friends users have or how often they update their status can also provide clues about the dark sides of their personalities.
"Facebook is about connecting people, but in so doing it has created a challenge of increasing competition in the market for social interaction," said Sikström.
"The competition for attention could actually end up getting people to reveal more of their dark side."
He explained, however, that Facebook users need not worry that Facebook friends who post odd status updates are indeed psychopaths.
"Even if you show psychopathic personality traits on Facebook, that doesn't automatically mean you are a psychopath," he said
Sikström added that the method must be adjusted before it can be applied to users who write in Swedish or other languages, but that theoretically it could be applied "in any language".
Nor will shifting from Facebook to Twitter or other social media sites won't help hide clues about users' personality traits, as the algorithm has been used on "all sorts of texts", García told the TT news agency.
And for users anxious about learning how to craft "analysis-resistant" status updates, the researchers offered up some advice: be open and use the word "I".
"Using the word 'I' indicates a certain humility. It also indicates a certain type of honesty," García said.
Sikström chimed in with a more direct tip: "try to be normal, and don't brag too much".