JERUSALEM — In a Facebook post a few days ago, one of the Israeli prime minister’s sons said he hoped the deaths of two Israeli soldiers killed by a Palestinian gunman in the West Bank would be “avenged” and said, “There will never be peace with the monsters in human form known since 1964 as ‘Palestinians.’”

In other posts, Yair Netanyahu, the older son of Prime Minister Benjamin Netanyahu, said he would prefer an Israel without any Muslims and mused that no attacks occurred “in Iceland and Japan where coincidentally there are no Muslims.”

Facebook removed the posts after a flood of complaints, saying they “included hate speech” and clearly violated the community standards. On Sunday, after Yair Netanyahu reposted a screenshot of one of the offending posts online and called on people to share it, the social networking giant suspended his account for 24 hours.

So he took to Twitter.

There he reposted a diatribe he had written against Facebook, describing it as “thought police” and protesting that it hosted “endless pages that call for the destruction of Israel and the murder of Jews.”