SAN JOSE (CN) – A federal judge dismissed a class action lawsuit on Tuesday accusing Facebook of spying on users who visit major cancer organization websites.

U.S. District Judge Edward Davila dismissed the suit without leave to amend Tuesday. Because the medical organizations accused of handing users’ private information off to Facebook are outside of California, the court lacks power – or “personal jurisdiction” – over the case, he said.

Davila added that the plaintiffs had agreed to Facebook’s tracking activities when they signed up for their accounts.

“Because they did not purposefully direct activities to California or purposefully avail themselves of the privilege of conducting business in California, this court lacks personal jurisdiction over the healthcare defendants,” Davila wrote in a 16-page ruling, much of it focused on the jurisdiction question.

Lead plaintiff Winston Smith’s attorney Jeff Koncius expressed disappointment with the decision.

“We’re obviously not happy, and when we filed the case we thought it had merit and we still think it has merit,” Koncius said in an interview. He added that Smith may appeal the decision or refile the case in the states where the cancer defendants are located because “we feel the disclosures being made are not appropriate.”

Smith sued Facebook, the American Cancer Society, the American Society of Clinical Oncology, and five other cancer organizations in March 2016, claiming that Facebook collects users’ private information from the medical organizations’ websites when users click on a Facebook “like” or “share” button embedded on the sites.

Smith said that Facebook can identify individual users, track the pages they visited on the defendants’ websites, and use the data to target them with tailored advertisements, in violation of the federal Wiretap Act and the California Invasion of Privacy Act, among other statutes.

However, Smith admitted in his complaint that he wasn’t sure the organizations knew Facebook collected user data from their sites.

The plaintiffs pushed back against the judge’s ruling that the Northern District of California federal court lacked jurisdiction. They argued that the fact that the medical defendants send the plaintiffs’ data to the California-based Facebook makes them subject to the court’s jurisdiction.

But Davila held that the evidence failed to show that the medical defendants do business in the state.

Assuming the cancer organizations didn’t know Facebook was harvesting information from their websites, Davila added that “personal jurisdiction requires ‘something more’—namely, ‘wrongful conduct targeted at a plaintiff whom the defendant knows to be a resident of the forum state.'”

“The healthcare defendants cannot have ‘targeted’ activity at known California residents if they were unaware that the activity was happening,” he wrote. “Besides triggering a second [message] request in the user’s browser, the healthcare defendants play no part in the exchange of data between Facebook and plaintiffs.”

Davila added that Smith had consented to Facebook’s tracking policies, which notify prospective users that it collects information about the websites they visit – including when they click on “like” buttons on those sites – when he signed up for an account.

Davila also rejected Smith’s contention that because Facebook collected “sensitive health information” about users, it must meet stricter disclosure standards under the Health Insurance Portability and Accountability Act, finding that Facebook hadn’t collected information considered protected under the law.

“We are pleased with the court’s decision,” a Facebook spokesperson said Tuesday.

Koncius is with Kiesel Law in Beverly Hills.

Facebook was represented by John Nadolenco with Mayer Brown in Los Angeles; the American Cancer Society by Shelley Hurwitz with Holland & Knight, also in Los Angeles; and the American Society of Clinical Oncology by Jeffrey Rabkin of Jones Day in San Francisco.

Hurwitz and Rabkin could not be reached for comment Tuesday afternoon.