A smear is a story that sticks to the image of a politician like a greasy fingermark.

It doesn't even have to be true; it just has to chime with what people want to believe.

But the Daily Telegraph smear about Nicola Sturgeon wanting David Cameron to be Prime Minister was neither true nor credible. And it turned into a farce straight out of Inspector Clouseau as the Scottish Office was revealed as the source of a leaked document whose meaning had been mangled by mistranslation.

I can't recall when a story has been so comprehensively trashed within hours of it appearing, as was the "Nikileaks" tale. The way it backfired tells us a lot about how politics and journalism have changed in the era of social media.

When the Daily Telegraph acquired a civil service memo claiming that the First Minister had told the French Ambassador that Ed Miliband was not prime minister material and that she wanted David Cameron to win, the newspaper clearly thought they'd struck pay dirt.

But within minutes of advance notice of the story appearing on the newspaper's Twitter account on Friday night, the First Minister tweeted that it was "100 per cent not true".

A politician's denial doesn't, of course, make a story false. But it ups the stakes considerably. As an old desk editor once said of a similar story: "It's a bit off, right enough, but still edible if thoroughly cooked".

The fatal error of the Daily Telegraph was not to have given Ms Sturgeon the right of reply before publication. This is routine journalistic practice for good reason.

The editors could have printed the denial along with the memo and left the readers to judge. They would still have been in control of the story.

But the fact that they hadn't approached her handed the moral initiative to the First Minister and betrayed the Telegraph's insecurity about the source. They must have known it was dodgy.

The next day, Severin Carrell of the Guardian and the BBC's James Cook demolished what remained of the tale by approaching the French ambassador and securing quotes that "the FM had never expressed any preference about who should be PM".

Diplomats never normally comment on a leaked official documents. But they clearly felt that, if they didn't, the ambassador might be seen as an accessory to a political smear campaign.

Farce then turned to tragedy for the Scottish Labour party, which had rushed to judgment and then found itself being excoriated as agents of the "lying" Tory press. The silence was deafening on Twitter.

But the so-called cybernats were in raucous voice. It was another plot hatched by the establishment and the hated "mainstream media" to do down the heroine of the independence cause. Nationalist outrage reached such a pitch that it began to self-destruct.

The internet angry brigade turned their fire on the BBC reporter James Cook as one of the agents of the hated "mainstream media" calling him a "liar","lackey" and worse. They seemed to forget that he'd been one of the journalists who debunked the whole story. Cook issued his own tweet complaining of being "abused".

Needless to say, this was hugely counter-productive and diverted attention from Ms Sturgeon's moral victory. The story ceased being how the Scottish Office, Labour and the Daily Telegraph had sought to stitch up the First Minister of Scotland, and became just another "cybernat hate campaign".

Really, with friends like these, the independence movement doesn't need enemies.

However, in the aftermath there emerged a degree of self-congratulation on social media at the way the story had been discredited before it got traction. People said it showed that the balance of power had shifted, and that Twitter was a more reliable source of news than the "dead-tree press".

And it is true that social media had, through the First Minister's intervention, prevented the initial story getting airborne. Politicians now have direct access to the media as never before, and Ms Sturgeon knows how to use it. Her immediate and categorical denial turned the story into a confidence issue that the Daily Telegraph couldn't win.

But in the end it was old-fashioned reporting by the hated "mainstream media" that had exposed the story's true falseness - using that indispensable tool of investigative journalism, the telephone.