“Stalin would be proud of you.”

As a journalist I am used to twitter trolls, angry comments written in capital letters and very personal invective. Responding to an essay I wrote for Foreign Policy recently, one reader wrote that I was a “vile little jackal snapping at what he thinks is a corpse but I think is anything but. If he’s American, revoke his visa and send him home. Otherwise, intern his little ass to prevent panic from spreading.”

However, I am not used to being trolled by director generals of the European Commission.

I stared at the tweet in disbelief, genuinely unaware of what I had written to provoke such a violent response from Jonathan Faull, the most senior British official permanently employed by the commission.

After a bit of Twitter-goading, Faull explained: “I'm not accusing anyone of Stalinism” – despite the fact that he just did – “but the expression is horrible, heavy with history.” The FT’s Peter Spiegel enlightened me, explaining how a term I slipped into my last column on ‘Europeople’ – “rootless cosmopolitans” – was used by the Soviet dictator to slander Jewish intellectuals.

As someone who studied European history, I should have known better than to employ that particular phrase. But to imply that by accidentally using it I am some kind of rabid Stalinist anti-Semite is willfully disingenuous – especially as I conceded that I too had become one of the “rootless cosmopolitans” after over 20 years in Brussels.

In a follow-up tweet, the director general for financial services - who first joined the commission in 1978 - countered: “Pride in multiple identities better than narrow nationalism.” Again, maybe he should have read the article more closely, especially when I wrote that “there is no contradiction between being proudly Catalan, Scottish or Polish and passionately pro-EU.”

This Twitter spat, trivial though it might appear, raises some important points about how the EU institutions – and their cheerleaders – should deal with critics and interact with the public.

Firstly, be civil on social media. Even Twitter and Facebook have unwritten rules. In general, you don’t insult people you disagree with. You should aim at engaging them in conversation, not screaming at them. And if you are in a position of authority, remember that nothing is private and what is posted online stays online.

Secondly, instead of endlessly repeating pro-EU mantras, supporters of the European project should create a culture of debate by listening to people, entering into an honest dialogue with them and learning to accept criticism better. The EU institutions have never been very good at this – which is why two-thirds of respondents in a recent poll said the Union did not understand their needs and 71 percent said their voice didn’t count in the EU.

All too often, Brussels’ response to criticism sounds like congressman Francis Underwood when confronted by a protestor in ‘The House of Cards’ - “Nobody can hear you. Nobody cares about you. Nothing will come of this.”

Faull, who should know better having been the commission’s chief spokesman for four years, could take a tip from one of his colleagues, Karmenu Vella.

After I criticised a video of Vella’s first 100 days in office – basically the commissioner going to conferences and making boring speeches – his office tweeted back: “The video tries to show how we need to get beyond the #EU bubble & engage. Thanks for feedback & happy to hear suggestions.”

When it comes to dealing with criticism, I am also a big fan of the European Commission’s representation in the United Kingdom, which dedicates a whole section of its site to countering the lies, half-truths and scare-stories about the EU cooked up by large chunks of the British press.

The rebuttals are robust but always lightened by humour. For example, a recent reaction to a Daily Mail article slamming plans to cut lawnmower emissions concluded: “Any idea that this is some kind of assault on British freedom to cut the lawn on a Sunday afternoon needs kicking into the long grass.”

Thirdly, the EU should occasionally admit it is wrong - for example, on the admission of a divided Cyprus or forcing the Irish to vote twice on treaties they opposed - and have the humility to apologise.

Indeed, it could take a leaf out of the reform textbook of Pope Francis, who has taken some sting out of the criticism levelled at the Vatican by confessing to past errors on issues like child abuse by clergy, addressing previously taboo issues - like homosexuality - head-on and pledging a shake-up of the institution he runs.

Unfortunately, the EU’s supporters are often their own worst enemies. They confuse criticism of the Union with rejection of it, patriotism with what Faull called “narrow nationalism” and listening to people with pandering to populism. Instead of attempting to justify the unjustifiable – like the obscenely generous pay, perks and tax package for EU officials – they should have the courage to call for its change.

Instead of dismissing the real concerns of citizens, whether over open borders or austerity measures, they should listen to them and engage with them.

And instead of bristling at criticism they should welcome it as a sign of healthy debate and a vibrant democracy.