SACRAMENTO, Calif. (AP) — Minors who post embarrassing photographs or information on social media websites would have a chance to remove it from public view under legislation being sent to Gov. Jerry Brown.

The bill by Senate President Pro Tem Darrell Steinberg requires that website operators give children a way to take down the material and to disclose on their sites how to make those requests.

SB568 also prohibits websites from marketing alcohol, tobacco and other products to minors. It further bans them from giving minors' identifying information to third-parties marketers.

It would apply only to registered users of the websites and take effect Jan. 1, 2015.

The Senate passed the bill 38-0 Friday, sending it to the governor.