Authorities say a Valley man allegedly had a sexual relationship with a 12-year-old girl he met through a social media app.