Your Future Doctor Could Monitor Your Facebook Posts for Disease

Medical providers could soon use your social media to predict diseases from depression to diabetes, sparking questions of data privacy.
mobile phone and stethoscope
Bruno Glätsch/Pixabay

Healthcare providers may soon seek help diagnosing and treating patients from an unlikely source: Facebook posts.

Researchers from the University of Pennsylvania School of Medicine have developed a system to mine social media posts for evidence of disease. In a new study published in PLOS ONE on Monday, social media data outperformed demographic data in predicting diseases such as diabetes, anxiety, depression, and psychosis. With access to social media data, researchers hope that doctors could better diagnose and treat many common diseases.


Facebook posts provide information about behavior, lifestyle, and mental state—information that your doctor might not have access to. Researchers treated words used in Facebook posts like symptoms, linking certain words to diseases.

“Before social media, there hasn’t been a really easy way to see how health affects our daily lives and how our daily lives affect our health,” co-author Andrew Schwartz said in a phone call. “This is another type of data that you can add to healthcare strategies.”

The researchers analyzed the entire Facebook post history of nearly 1,000 patients, with their consent. To build the predictive model based on Facebook posts, they correlated groups of words with diseases. They tested three models to predict diseases —one relying solely on language in Facebook posts, one using demographic data such as age and sex, and one relying on a mix of the two. Then, researchers used patient medical records to check predictions.

For some terms the researchers looked at, the connection with a particular health issue was obvious. Repeatedly saying “drink” reliably predicted alcohol abuse, for example. Others links were less direct. For example, patients who used more religious language like “God” and “pray” were 15 times more likely to have diabetes.

The team evaluated the 21 different conditions most often diagnosed in the study population, located in Philadelphia, ranging from lung disease to anxiety. All 21 were predictable using just Facebook data, the team found. When combined with demographic data, Facebook posts improved predictions for 18 of the 21 diseases. Facebook data alone outperformed demographic data in 10 cases, and was particularly effective at predicting diabetes and mental health conditions.


The study was performed on patients from one medical center, in which 76 percent of participants were female and 71 percent were Black. “This is just the first step towards this type of work,” Schwartz said. “We would expect the same type of analysis to be similarly powerful in other populations.”

Though social media language doesn’t pinpoint the cause of the disease, it can inform treatment and prevention. Schwartz emphasized that this type of research is still in the basic stages, but that social media intervention could be particularly helpful for mental health patients. Already, Facebook flags posts with suicidal language and provides the user resources.

Despite promising results, some are worried about the privacy risks of allowing doctors access to social media.

“Linking people’s social media posts to private, sensitive information, including their address and health records, creates an inherent privacy risk,” Amy Shepherd, legal officer at the digital rights non-profit Open Rights Group, said in an email.

Shepherd noted that this study protected data privacy well by obtaining explicit consent and making sure individuals can’t be identified within the results. Because the study had such success, however, there is a risk of an uncontrollable snowball effect.

“If health records and social media data start to become more routinely linked, the privacy risks could be far more significant,” Shepherd said.

Doctors still need to follow strict health data guidelines, meaning they would need to obtain informed consent from each patient before accessing and sharing their social media record. Even then, it may be difficult to export this kind of automated healthcare to other jurisdictions with stricter privacy laws, such as countries in the European Union.

If your social media posts suddenly become part of your health records, that means insurance companies might have access to it too. With that, your insurance could set premiums based on your lifestyle, determining how much you pay depending on what you post. In New York, insurance companies can use your social media to set premiums, as long as they show they aren’t unfairly discriminating against certain groups.

A question people may need to ask themselves in the future is: Do I want my doctor to read my Facebook posts? It’s unclear how many people would take healthcare providers up on this offer, especially considering growing concerns over data privacy.