There was a bill (H.R.414: Camera Phone Predator Alert Act - U.S. Congress - OpenCongress) in congress back in 2009 that intended to make it illegal. Fortunately, it failed in committee.
https://www.govtrack.us/congress/bills/111/hr414
However, it has become somewhat of an urban legend at this point...