In the affidavit, officers said the accused told them he didn't know the victim was underage.

Robert Ritchey, 21, of Waltham appeared in Addison County court on Monday afternoon to answer to charges of attempting to lure a child for sexual acts and the transmission of indecent material.

He plead not guilty to both counts.

According to court documents, Ritchey and a 15-year-old boy met on Facebook. Officers report the boy told them Ritchey sent him graphic photos via text message.

Later, investigators said the victim said Ritchey invited him over to have sex.

The boy told investigators Ritchey knew he was a minor. Prosecutors said this age of new media is leading to new types of cases.

"Now individuals communicate by text message, Facebook and all other sorts of social media and that's done obviously across the board for all kinds of reasons and some of those communications start to become communications that could lead to the types of things that could become criminal offenses, depending on the nature of communication," said David Fenster, state's attorney for Addison County.

Ritchey was released on conditions that include no contact with children under the age of 16 and no Facebook use.

The state's attorney said he isn't aware of any other charges pending against Ritchey or if Ritchey had other alleged victims.