Connor Regan, 19, of Tweed Crescent, was ordered to carry out 40 hours of unpaid work in the community.
Regan admitted sending grossly offensive messages to his former partner Stevie Johnstone in which he threatened him with violence, on June 3 and 4, at a property on Morgan Street.
The court heard Regan committed the offence after Mr Johnstone ended their relationship via social media.
This article originally appeared on the Evening Telegraph website. For more information, read about our
new combined website.
Dundee man threatened ex with violence after he ended relationship on social media