Criminal defendants' right to information that will aid in their defense does not extend before trial to social networking posts that are protected under federal law, a California appeals court ruled Tuesday.

The decision by a division of the San Francisco-based 1st District Court of Appeal rejected two murder defendants' efforts to get access to records from the Twitter, Facebook and Instagram accounts of the victim and a prosecution witness.

One of the defendants, Lee Sullivan, argued that the social media postings would show the witness who implicated him in the 2013 drive-by shooting in San Francisco, Renesha Lee, was motivated by jealousy, and the victim, Jaquan Rice Jr., was a violent criminal who threatened people, according to court records. Prosecutors have said Rice's shooting was gang-related.

The social media companies rejected subpoenas by the defendants, arguing that federal privacy law prevents them from disclosing the material the defendants' were seeking.

A trial court sided with the murder defendants, but the appeals court overruled that decision. It said both the California and U.S. Supreme Courts have limited defendants' right to material that will aid in their defense before trial.

The court, however, said its ruling was limited to pre-trial efforts by the defendants to obtain the material, and nothing stopped them from seeking the material again at trial.

Jose Umali, an attorney for the other defendant in the shooting, Derrick Hunter, cited that part of the ruling, saying the court was saying his client's concerns were legitimate.

Hunter has pleaded not guilty to the charges, according to Umali.

Calls to attorneys for Sullivan were not immediately returned.

The two defendants argued that their constitutional rights to present a complete defense, cross-examine witnesses and have a fair trial trumped the privacy rights of social media users.