The findings should “ring alarm bells” for users, privacy campaigners said.
The study used 58,000 volunteers who alongside their Facebook “likes” and demographic information also provided psychometric testing results – designed to highlight personality traits.
The Facebook likes were fed into algorithms and matched with the information from the personality tests.
The algorithms proved 88% accurate for determining male sexuality, 95% accurate in distinguishing African-American from Caucasian-American and 85% for differentiating Republican from Democrat.
Christians and Muslims were correctly classified in 82% of cases and relationship status and substance abuse was predicted with an accuracy between 65% and 73%.
The links clicked rarely explicitly revealed these attributes. Fewer than 5% of gay users clicked obvious likes such as gay marriage, for instance.
Instead, the algorithms aggregated huge amounts of likes such as music and TV shows to create personal profiles.