Oct 15, 2010 06:20 GMT  ·  By

Two men have filed a lawsuit against Facebook, accusing the company of knowingly violating its privacy policy by sharing personally-identifiable information with advertisers.

The Facebook platform enjoys a great success with advertising company, because it allows them to serve highly targeted ads to users, based on age, location or interests.

Facebook is very clear about using demographic data to deliver relevant advertisements, even when this data is specifically hidden by others.

However, it stresses that it will never share a user's identity with advertisers without their explicit consent.

"For example, we might use your interest in soccer to show you ads for soccer equipment, but we do not tell the soccer equipment company who you are," the company writes in its privacy policy. "Facebook’s ad targeting is done entirely anonymously," it adds.

According to the complaint [pdf] filed by two Facebook users named David Gould and Mike Robertson in California Northern District Court, the company broke that promise by including unique account identifiers in HTTP Referer headers.

The Referer header field is part of the HTTP specification and is implemented by all browsers. It provides a way for websites to tell where their visitors came from and contains the URL of the page users were viewing when they clicked on the link that brought them there.

From February 2010, following a website update, Facebook began including user IDs and/or usernames in the Referer headers, therefore allowing advertisers to identity people who clicked on their adds.

Both the user ID and username can be used to access a person's Facebook profile, which contains their name. Knowing these identifiers, advertising companies can build automated scripts to associate people with ad clicks.

Facebook admitted the existence of the problem and addressed it after it was publicly exposed in May by Professor Benjamin Edelman of the Harvard Business School and the Wall Street Journal.

The complaint alleges that the company was aware of the implications of including user IDs in Referer headers when re-designing the website. The lawsuit seeks class action status.