B.C.
Take away her devices - she obviously can't handle using any.
Ask her where she got the idea that she should do this.
Talk to her about why what she did was wrong and why it's against the law.
Tell her she has a lot to learn about respecting herself.
After a grounding is over - she can use devices only in public areas of the house and only when she's not alone - so you know exactly what she is up to.
Let her know that you will be checking on her as long as you are paying for any devices she is using - and then follow through with doing it.
I'd do a search of the sex offenders in your area and see how close any of them live near you and I'd really keep track of who she is spending time with.
Our sons preschool had a presentation by Yello Dyno about protecting kids from predators.
Look at their info and see if it's something you should watch with your child.
http://www.yellodyno.com/html/ydvids.html