The 'Common Rule'
Under federal law, any federally funded experiment has to comply with two basic rules. It's called the "Common Rule."
The first requirement: All human subjects must give informed consent before the experiment begins. That means more than saying “yes”: Human subjects must be given enough information by researchers to know what they’re getting themselves into.
The second: Any research involving humans must be vetted by an “institutional review board,” or an IRB, which vets the legality of the experiment.
Facebook's experiment wasn't federally funded, though, so it obviously didn't break federal law. But, Maryland's House Bill 917 puts those same protections in place for any research conducted in the state, whether it's federally funded or not. New York and California have similar rules in place.
Ultimately, the legality of the experiments will be decided by the Attorney General's interpretation. That's because Facebook is claiming its research was product testing, and those types of studies are exempt from the law. Several other law professors agree with them, too. While the studies might have been a bit shady, they don't think they violated state or federal law.
[Law professor Valerie] Koch said she largely agreed with a July letter published in "Nature" by six bioethicists that said that, while it would have been preferable for Facebook to run its study past an IRB, the experiment did not constitute “an egregious breach of either ethics or law.”
Only time will tell which side the Maryland Attorney General agrees with. Until then, users beware. Your social media and dating sites might be performing psychological experiments on you.