Justin Trudeau's government seems to have made a tactical error in trying to address human rights in Saudi Arabia.

By tweeting for everyone to see, rather than conducting traditional closed-door diplomacy, Canada has been hurt by Saudi Arabia's retaliation with nothing to show for it.

A former Canadian ambassador to Saudi Arabia asked how this tweet helped anyone in Saudi Arabia or in Canada — and found that it most likely did not.

Canadian Prime Minister Justin Trudeau is no stranger to human-rights advocacy and showy displays of allyship with marginalized communities.

But his government seems to have made a tactical error in trying to address human rights in Saudi Arabia.

On Friday, Canada's foreign-affairs Twitter handle urged the "immediate release" from imprisonment of the Saudi women's-rights activist Samar Badawi and others detained for similar activities in the kingdom.

Saudi Arabia issued a blistering response, quickly and sometimes harshly turning its state-run media to bash Canada.

In less than a week, Saudi Arabia then expelled its Canadian ambassador, froze all new investment, canceled all flights to Toronto, pulled thousands of students from Canadian institutions, barred its citizens from getting medical treatment in Canadian hospitals, and reportedly sold off all its Canadian assets.

Canada remained firm in its support for the activists, with both its foreign minister and Trudeau doubling down on the sentiment.

"Canadians have always expected our government to speak strongly, firmly, clearly, and politely about the need to respect human rights at home and around the world," Trudeau told journalists on Wednesday.

"We will continue to stand up for Canadian values and indeed for universal values and human rights at any occasion," he said.

But whether Canada expects its government to use Twitter to compel foreign countries to meet its standards remains an open question.

In the view of David Chatterson, a former Canadian ambassador to Saudi Arabia, Trudeau's government made a tactical error.

Was this tweet good for Canada?

Saudi Crown Prince Mohammed bin Salman is overhauling the theocratic monarchy in ways that have both elevated human rights and improved economic prospects in the country.

By Western standards, Saudi Arabia still lags far behind in its treatment of women and in its justice system, which recently saw a man crucified in Mecca. In changing Saudi Arabia, however, the crown prince must find a way to roll out popular measures while maintaining the support of the country's religious hardliners.

To Chatterson, tweeting demands at the Saudi government doesn't help advance human rights, or anything.

"The hard truth here is that the world is not waiting for Canada to preach to them or to criticize them," Chatterson told CBC News. Canada and Saudi Arabia have a limited economic relationship, and Trudeau simply doesn't have much sway over a small country half a world away that is further separated by language and culture.

"That's not really what most countries do," Chatterson said of the tweet. "Most countries engage in a dialogue, they work in a very strategic manner, they work with like-minded countries. But issuing critical tweets is not really the best way to deal with that."

The US, for example, presses Saudi Arabia on human rights in an annual report and, presumably, in closed-door meetings between diplomats. Diplomacy is an old practice with established norms, and the diplomats overwhelmingly prefer a quiet dialogue to putting people on blast via social media.

President Donald Trump, for example, has received wide criticism for conducting diplomacy on Twitter, a practice Canada has now followed.

Chatterson held up Canada's recent Twitter diplomacy to traditional diplomatic benchmarks and found the government's efforts lacking.

"What's our objective here?" Chatterson said. "Was it to mitigate the circumstances of Badawi? In that case, we failed.

"Was it to influence the broader direction of Saudi Arabia? Again, I don't think we've done that. Have we advanced Canadian interests? Definitely not."

Canadian Muslims now can't fly directly to Saudi Arabia for the annual hajj later this month in Mecca. Canada has lost money on trade with Saudi Arabia. Canada lost the opportunity to educate young Saudis, a population presumably more open to the types of changes being championed by the crown prince.

If Canada feels its human-rights standards are desirable, it ought to attempt to export them to other countries. But by using Twitter it may have shot itself in the foot.

"In my humble opinion, the purpose of [Canadian] foreign policy is to advance Canadian interests," Chatterson said. "Put simply, that's what we're trying to do."

On the whole, human rights and women's rights are improving in Saudi Arabia, but as part of a delicate balancing act. Canada now has lost money and influence in the kingdom over a tweet.