Until now, Google has been the biggest target of blame … but now we’re seeing Facebook in the thick of it also.

It’s only been in the past year that Facebook has made a real run for the money when it comes to paid search advertising. There are some very positive aspects to Facebook’s advertising program, which can target where ads are served based on behavioral and psychographic factors from the Facebook profiles of members and their friend networks. This is something Google has had a difficult time emulating. (Not that they haven’t been trying … which is what the new Google +1 beta offering is all about.)

But now, Facebook is the target of a lawsuit from a number of advertisers who contend that there are major discrepancies between Facebook’s click volume and the companies’ own analytics programs which suggest that the purported clickthrough activity is significantly inflated.

As an example of one company that is a party to the lawsuit, sports fan site RootZoo alleges that on a single day in June 2010, its software programs reported ~300 clicks generated by Facebook … but Facebook charged RootZoo for ~800 clicks instead.

While contesting the allegations vigorously, Facebook’s attorneys have also argued against the company having to disclose the source code or other details of how it calculates clickthrough activity, citing fears that the proprietary information could be leaked to outside parties (competitors) as well.

But that argument fell on deaf ears this past week. Instead, Facebook has been ordered by the U.S. District Court in San Jose, CA to disclose a wide range of data, including its source code for systems to identify and filter out invalid clicks.

In making this decision, Magistrate Judge Howard Lloyd stated, “The source code in this case implemented Facebook’s desired filtering, and whether that filtering [has] lived up to Facebook’s claims and contractual obligations is the issue here.”

This ruling appears to call into question the sweeping terms and conditions that Facebook advertisers are required to sign before beginning a media program. The relevant language states: “I understand that third parties may generate impressions, clicks or other actions affecting the cost of the advertising for fraudulent or improper purposes, and I accept the risk of any such impressions, clicks or other actions.”

[This isn’t the only incidence of Facebook’s broad and restrictive stipulations; another particularly obnoxious one deals with “ownership” of content posted on Facebook pages – basically, the content creator gives up all rights of control — even if the content came to Facebook through a third-party source.]

But in this particular case, evidently the terms and conditions language isn’t sweeping enough, as Judge Lloyd ruled that the plaintiffs can sue on the basis of “invalid” clicks, if not “fraudulent” ones.

Touché! Score one for the judges against the lawyers!

Of course, it’s way too soon to know how this particular case is going to play out – or whether it’ll even get to court. It’s far more likely that Facebook will settle with the plaintiffs so as not to have to disclose its source code and other “trade secrets” — the very things that cause so many marketers to see paid search advertising as a gigantic black hole of mystery that is rigged against the advertisers no matter what.

But one thing is easy to predict: This won’t be the last time the issue of pay-per-click advertising is brought before the courts. Whether the target is Facebook, Google or Bing, these skirmishes are bound to be part of the business landscape for months and years to come.