Oh yes he did
Did any of the "Facebook does this", "No, Facebook does that" posters above read the part about "after bombarding her with phone calls and text messages"?
The guy was under an injunction to stop contacting his wife. It is not the role of the judge or anyone else to hold his hand as he walks through life and help ensure that he understands every feature of every (in the case of Facebook, in my opinion) pointless, time-wasting piece of software trash he's ever likely to use.
That's his job. He is under a court order to not contact his wife. He broke that court order because he used something he didn't learn enough about before using it. He spent a few days in jail. Hardly the most egregious miscarriage of justice I've ever heard of.