A teenager who joined loyalist flag rioters after checking Facebook was jailed for three months.
David Crooks admitted throwing stones at police during disorder in the Newtownabbey area, Belfast Magistrates Court heard.
The 19-year-old claimed he had gone along to watch but got caught up in the December 8 riot.
Crooks, of Rosslea Way, Newtownabbey, faced a single charge of riotous behaviour.
His solicitor argued "he was on Facebook and saw things were happening". "Initially he was going to spectate but got caught up in it. He accepts that was one of the most foolish things he's ever done."
District Judge Fiona Bagnall accepted Crooks has a clear record and pleaded guilty early on, but ruled the seriousness of the offence warranted a jail sentence.