Both men were banned from posting on social networks for six months