Plenty of diplomatic deals get done on the margins of global get-togethers, but one conducted on Twitter in 2014 made Prime Minister Stephen Harper a digital star among his fellow world leaders.

Harper's trash-talking tweet to U.S. President Barack Obama about the men's and women's hockey finals at the Sochi Olympics was among the most retweeted missives from world leaders last year, according to the annual Twiplomacy study of online activities of global politicians.

The message — "Like I said, #teamusa is good but #wearewinter. @BarackObama, I look forward to my two cases of beer. #CANvsUSA #Sochi2014" — was forwarded more than 23,000 times.

Like I said, <a href="https://twitter.com/hashtag/teamusa?src=hash">#teamusa</a> is good but <a href="https://twitter.com/hashtag/wearewinter?src=hash">#wearewinter</a>. <a href="https://twitter.com/BarackObama">@BarackObama</a>, I look forward to my two cases of beer. <a href="https://twitter.com/hashtag/CANvsUSA?src=hash">#CANvsUSA</a> <a href="https://twitter.com/hashtag/Sochi2014?src=hash">#Sochi2014</a> —@pmharper

(Can't see the tweet? View it here.)

"I am not surprised that the occasional fun and quirky tweets work best, but it doesn't mean that Twitter is not used for serious exchanges," said Matthias Luefkens, a digital practice director at global public relations agency Burson-Marsteller, which puts out the study.

Other popular messages last year included Indian Prime Minister Narendra Modi's celebration of his election, retweeted more than 70,000 times; since his election in May, Modi has become the third-most followed world leader on Twitter, and currently has over 10 million people signed-up to watch his account.

The first tweet personally sent by Queen Elizabeth II, about the opening of a museum exhibition, was reposted over 42,000 times, while a message from the prime minister of Malaysia about the disappearance of MH370 was retweeted over 32,000 times.

Most world leaders use the social media tool to broadcast specific messages; Harper is among many who don't generally reply when messages are sent their way.

But foreign affairs departments tend to be more engaged. Canada's is among the most active, with 184 missions and heads of missions on Twitter, second only to the United Kingdom.

Diplomatic hashtag spats

Twitter is becoming an essential tool of 21st-century statecraft, the study says, both in terms of public diplomacy and public engagement.

Former foreign affairs minister John Baird in part led the charge for Canada. After suspending diplomatic ties with Iran, Baird spearheaded a campaign to use social media to reach regular citizens of that country in 2013 during the presidential election.

In 2014, Canada was part of a co-ordinated campaign led by the U.S. State Department to use the hashtag #UnitedforUkraine in order to register their official unease over Russia's actions there.

Not to be outdone, the study noted, the Russian government started using the hashtag as well to provide its point of view.

"Of course, hashtags alone will not bring back the girls from captivity in Nigeria or bring peace to Ukraine," the study said.

"However, they serve as a powerful rallying cry on specific issues and causes, and help give them international recognition as a trending topic on Twitter."

Harper had his own online dig at the Russian government, pointedly unfollowing its prime minister on Twitter last year. Dmitry Medvedev no longer follows Harper either.

Baird stepped down as foreign affairs minister earlier this year. So far, successor Rob Nicholson has not shown the same proclivity for building a presence online.

The study notes that Nicholson only follows three other foreign affairs ministers and rarely tweets himself, though the official Canadian foreign-policy Twitter account follows 47 similar departments around the world.

View a graphic of world leaders' Twitter numbers from The Canadian Press