A vandal was caught urinating on seats and spraying a bus with graffiti.
Richard Tracey, 21, from Birmingham was caught on CCTV vandalising the number 45 National Express bus.
ITV News reports that he appeared at Birmingham Magistrates' Court on Thursday and admitted the damage, but only after the video reached police and was posted on social media sites.
Pc Shaun Hickinbottom, from the Safer Travel team, told the Birmingham Mail: "When faced with the CCTV evidence Tracey had no option but to admit the offences.
"It was an appalling act of vandalism and I am pleased he's had to answer to it in court; this really is testament to the power of social media and just shows the public are not willing to tolerate this sort of behaviour on their public transport."
Tracey was sentenced to a community order until 16 December and ordered to pay £600 compensation to National Express, as well as £100 court costs.
Driver caught urinating on his own bus
Police hunt man who got naked and urinated in train station lift