SAN FRANCISCO — The Ninth Circuit shielded Facebook and Zynga from federal wiretap claims on Thursday, but opened the door for plaintiffs to pursue state law claims against the social networking giant.

In putative class actions that were consolidated on appeal, plaintiffs alleged Facebook Inc. and Zynga Inc. violated their privacy by sharing their confidential information with third parties. But the U.S. Court of Appeals for the Ninth Circuit spared the companies, finding they had not disclosed the substance of users’ messages, as required for claims under the Electronic Communications Privacy Act.