A reputed gang-banger from The Bronx who boasted online about his alleged criminal exploits had his “private” posts reviewed by the feds after one of his Facebook friends turned rat.

Melvin “Melly” Colon — who used the online alias “Mellymel Balla” — tried to repair the damage by claiming that his constitutional rights were violated when the Bureau of Alcohol, Tobacco and Firearms searched his Facebook account.

But Manhattan federal Judge William Pauley III ruled that any evidence gleaned from the account was done so legally, even though Colon “undoubtedly believed that his Facebook profile would not be shared with law enforcement.”

”Colon’s legitimate expectation of privacy ended when he disseminated posts to his ‘friends’ because those ‘friends’ were free to use the information however they wanted — including sharing it with the government,” Pauley wrote.

”When Colon posted to his Facebook profile and then shared those posts with his ‘friends,’ he did so at his peril.”

According to court papers, Colon’s posts included writing “Im trying to see the man for like 600 grams” — which the feds say is a reference to crack cocaine — and “Wats ya body count n— im triple digits!”

Colon, 20, also allegedly posted several photos of himself and others “making hand gestures commonly referred to as ‘gang signs’” and showing a gang-related tattoo on his hand.

Colon was busted last year on a slew of charges tied to his alleged leadership of the Courtlandt Avenue Crew, including the August 2010 murder of suspected drug dealer Delquan Alston, 21, outside a housing project in the Melrose section.

Alston’s fatal shooting was part of a turf war involving the Courtlandt Avenue Crew and an affiliated gang, God’s Favorite Children, that resulted in “approximately ten murders, 11 non-fatal shootings and one non-fatal stabbing” between June 2010 and December 2011, according an affidavit signed by an unidentified ATF agent.