Facebook ‘outs’ gay users through some of its targeted ads, researchers have discovered.

According to a study by Saikat Guha of Microsoft Research India and Bin Cheng and Paul Francis of Germany’s Max Planck Institute for Software Systems, advertisers can find out which Facebook users are gay, even when the users have not made their sexual orientation public.

They set up Facebook profiles for 25-year-old men and women from Washington DC, with the only difference being the sexual orientation of the fictitious users.

They found that some ads which were completely neutral to sexual orientation (such as a nursing degree at a Florida medical college) were targeted exclusively at gay man.

The researchers said: “The danger with such ads, unlike the gay bar ad where the target demographic is blatantly obvious, is that the user reading the ad text would have no idea that by clicking it he would reveal to the advertiser both his sexual-preference and a unique identifier (cookie, IP address, or email address) if he signs up on the advertiser’s site.”

It is now common for interviewers to enquire where applicants saw jobs listed. In the case of the medical college, it could find out that the user who clicked on the ad was gay.

“Deceptive” ads such as this were not uncommon, the researchers found. In the study, half of the ads shown to gay men did not mention ‘gay’ anywhere in the text.

There was little difference in the ads targeted at straight women and lesbians, which suggests that advertisers are more interested in reaching gay men.

This is the latest privacy issue for Facebook, which has been struggling to reassure users that they can keep their personal details confidential.

This week, it was claimed that third-party Facebook applications, such as Farmville, were sending Facebook user IDs to advertising and Internet tracking firms.