Prosecutor Linda Baker told the court that following a complaint to police, other offensive tweets by Robert Riley came to light.
Among them were messages about the missing Malaysian plane, the Korean ferry disaster and champion tennis player Serena Williams.
More top news
Coast & Country returns tonight with a brand new series showcasing the very best of the Welsh countryside and its people.
Ghosts and ghouls a plenty will be out on the streets of Wales this evening, but it's not the first time they've been spotted this year.
It will be very mild, with early cloud lifting and breaking to allow some warm sunny spells by the afternoon.