MENLO PARK, Calif.—On a recent afternoon, police officer Mary Ferguson visited the home of a teenager in this Silicon Valley suburb who had been missing school and was on probation.

Officer Ferguson approached the boy's father as part of her rounds and asked if he checks the teen's Facebook page to make sure he's "on the up and up." When the man said he didn't, the officer assured him she did—thanks to a Facebook account she uses as part of her job that doesn't reveal her true identity. "I'll keep my eye on...