He is in custody until a judge sets bond, Cavalier said. CNN was unable to reach Martin or known relatives under numbers listed for them.

Martin showed detectives a receipt for the purchase of Blue Bell Ice Cream, suggesting that he bought the contaminated ice cream, Cavalier said. But the purchase doesn't absolve him of wrongdoing, Cavalier said, "because at any rate it's a terrible thing to do."

"Taking into consideration that he eventually purchased the same container is one thing," Cavalier said.

"However he puts it on Facebook to gain this notoriety and at the end of the day, it gives other people ideas that are not the best interest of public health," Cavalier said.

Based on comments Martin allegedly made to detectives, the sheriff's office believes he was inspired by a video of a juvenile who opened a carton of ice cream at a Texas Walmart, licked it and put it back, Cavalier said.

"We believe it's a copy cat incident," Cavalier said.

"He did it and he did want to create some notoriety for himself by posting it on Facebook and that's exactly what he did."