But she warned of what the work showed about privacy on Facebook.
"You may not want people to know your sexual orientation or may not want people to know about your drug use," she said. "Even if you think you're keeping your information private, we can learn a lot about you."
Facebook said the study fell in line with years of research and was not particularly surprising.
"The prediction of personal attributes based on publicly accessible information, such as ZIP codes, choice of profession, or even preferred music, has been explored in the past," Facebook's Frederic Wolens said in a written statement.
Wolens said that Facebook users could change the privacy settings on their likes to put them beyond the reach of researchers, advertisers or nearly anyone else. But he declined to say how many users did so.
For the unknown number of users whose preferences are public, Stillwell had this advice: Look before you like.
The like button is "quite a seductive thing," he said. "It's all around the Web, it's all around Facebook. And it's so easy."
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.