SAN FRANCISCO — The Biometric Information Privacy Act of Illinois is not a law many are familiar with. But if you have ever shared a photo on social media, the little-known statute turns out to be one of the nation’s toughest regulations for how companies like Facebook and Google can use facial recognition technologies to identify you online.

For now.

On Thursday, an Illinois state senator, Terry Link, introduced an amendment that would have weakened the law by exempting photo-tagging technologies that are now commonly used on social media. The proposal also had the potential to extinguish several class-action lawsuits against technology companies like Facebook by retroactively removing the right of Illinois citizens to sue companies that might have broken the law in the past.

The amendment was lobbied for by Facebook, according to a person involved in the effort who spoke on the condition of anonymity. And it helps to illustrate how from drone aircraft to genetic information and statutes that govern how companies sell consumer information to data miners, tech companies are in a capital to capital fight to keep new laws from being passed or to soften those already on the books.

“The Illinois biometric privacy act is one of the best new privacy laws in the country,” said Marc Rotenberg, president of the Electronic Privacy Information Center. “It’s bad news for consumers when Internet companies start lobbying against good privacy laws.”