Armed with that information, they had the program analyze the friend links of 947 other men who did not disclose their sexuality. The students couldn't scientifically verify the predictions made by the program, but based on their personal knowledge of 10 people in the sample who were gay but did not say so on Facebook, they concluded that the program appeared to accurately identify gay men.
It was not as successful in identifying bisexual men or women or lesbians.
Computer science experts say "Gaydar" is just one of a growing number of projects to mine social networks and relationships between people for potentially valuable, but personal, information.
"Social network analysis has been a field, in general, that has been around for a while. What has changed recently is the availability of the social networks," said Murat Kantarcioglu, assistant professor of computer science at the University of Texas at Dallas. Now that hundreds of millions of people have accounts with online networks, such as Facebook, sample sets and research potential have expanded, he said.
Earlier this year, he and a student who now works for Facebook, published their own findings on social network analysis. In 2007, they collected and analyzed more than 167,000 profiles in the Dallas/Fort Worth to predict political affiliation.
They found that certain bits of information, such as group memberships or favorite movies, were more predictive than others.
"I think this is just the start," he said. For marketing purposes, he said companies are already trying to discern as much as they can from the pieces of information revealed online.
The next step is integrating information on social networks with other data streams, such as medical records, credit card information or search engine histories, Kantarcioglu said.
Though it's far-fetched now, he said in the future, insurance companies could even analyze social networks to predict health risks.
For example, there are some studies that a person's family and friends can be indicative of the person's habits can. Hypothetically speaking, an insurance company could look at photos of family members and friends on a user's Facebook page and draw inferences about that user's eating habits.
By combining a person's medical history with anecdotal information about their friends gleaned from Facebook, insurers could try to calculate risk.
But while the MIT researchers say their project highlights privacy risks, others who research social networks caution that people shouldn't read too much into this.
"What these guys have done is nothing new. We commonly make judgments about people based on their acquaintances," said Jason Kaufman, a research fellow at Harvard University's Berkman Center for Internet & Society. "What they've really done is throw sophisticated computer software and data at a problem like this."
He also emphasized that private firms are already accessing streams of data, such as credit card and prescription data, without authorization.
Judith Donath, director of the Sociable Media research group at the MIT Media Lab and a faculty fellow at Berkman, took an even more optimistic view of the "Gaydar" project's findings.