GLOUCESTER TOWNSHIP, NJ (CBSNewYork) – A man caught dancing on surveillance video while allegedly trying to shoplift from a K-Mart has been arrested.

Gloucester Township Police said Anthony DiVietro, 26, of Stratford, stuffed a woman’s dress under his shirt and tried to leave the store without paying for the merchandise on Oct. 1.

Police say he tossed the clothes and took off when he was confronted by security.

Officials posted the surveillance video on YouTube and Facebook in hopes that it would help identity and track down the suspect. Well, it worked.

According to police, the video was viewed approximately 3,700 in a 12-hour period after it gained media attention. Police received several telephone tips leading them to DiVietro.

He has been charged with shoplifting and police determined DiVietro also had an outstanding warrant. He was released on his own recognizance.

Chief Harry Earle said they have solved four cases since February 2011 using social media.

Watch & Listen LIVE