A judge yesterday threw out most of the claims made in a lawsuit against Facebook, in which two California individuals, David Gould and Mike Robertson, accused the social networking giant of sharing their names and other private information with some advertisers in direct violation of its own privacy policy.

That said, the judge also ruled the lawsuit will not be dismissed in its entirety either, as Facebook had pleaded.

The allegations against Facebook basically accused the social network of sharing users’ personal information with third-party advertisers, specifically sharing the username, or user ID, of Facebook users.

Facebook admitted that this happened, but downplayed the risks involved and quickly plugged the security hole in question.

Gould and Robertson, however, rather swiftly lodged a complaint alleging that the Facebook security flaw violated the Electronic Communications Privacy Act, the Stored Communications Act, and California’s Computer Crime Law and Consumers Legal Remedies act.

U.S. District Judge James Ware in San Jose, California, yesterday unequivocally rejected Facebook’s argument that Gould and Robertson’s lawsuit should be dismissed because the users didn’t show an injury sufficient to bring the case, which means the company will have to actually face the lawsuit. The judge granted the two men their right to sue, but was skeptical of the case overall. You can find the relevant documents below.

Ware also threw out all of the plaintiffs’ claims against the company (8 out of 8, actually), giving them a chance to refile only five of those dismissed.

We’ll see what happens next – we’ll keep you updated.

FWIW, a Facebook spokesperson said the company was “pleased with the court’s ruling”.