Like many jobbing scribblers, I have been known to waste time on social media, noodling about on Twitter when I should be finishing articles like this one.

But sometimes you get more than you bargained for.

At the height of last week's ludicrous row about the state of Ed Miliband's kitchen - or rather kitchens - I amused myself by tweeting a picture of the First Minister in a kitchen. "How many kitchens does Nicola Sturgeon have?" I asked in my best Daily Mail-ese. "And why is no one asking the question?"

Some time later I had an answer from @NicolaStugeon herself: "All questions regarding my kitchen", she tweeted, "should be relayed to Peter Murrell who is much better acquainted with it than I am." This was at one and the same time very funny and slightly alarming.

It was amusing because here was the First Minister saying that she didn't really do a lot of cooking and didn't care who knew it. Good. There was a time when women in politics had to demonstrate their home-making skill in the most patronising and humiliating fashion. You may recall footage of Margaret Thatcher cooking Denis's breakfast for the TV cameras in the (actually rather squalid) kitchen in Number 10.

But it does rather concentrate the mind when you suddenly realise that you are in direct contact with the elected leader of the nation in real time. You feel you ought to stand up or something. Put a tie on; tuck in your shirt.

Anyway, you're never entirely sure it's really her, since there are so many Twitter parody accounts purporting to be politicians and famous names. But if there were any doubts about the authenticity of the FM's tweet they were dispelled shortly afterwards when Ms Sturgeon's husband, @Peter Murrell, entered the discussion.

He questioned the provenance of the kitchen picture I had tweeted on the grounds that he'd never seen the First Minister that close to a stove before. The chief executive of the SNP is very good with steak and chips apparently.

Now, this wasn't the first time I'd encountered the FM on social media. There was the time I criticised her decision to abolish early release for long-term prisoners as a capitulation to populism. She politely but firmly put me in my place, insisting that she was also reforming the parole board.

And I'm certainly not the only journalist who receives her attentions. Many do. One colleague asked Twitter whether the SNP had dropped its "red line" on Trident renewal in any coalition negotiations. "No" came the emphatic reply from @NicolaSturgeon.

This says a lot about the First Minister's bottle and is one reason she is highly regarded even by journalists who dislike what she stands for. It takes extraordinary self-confidence for a politician to handle their own social media.

It would be unthinkable in Westminster where there are legions of spin doctors whose sole job it is to pretend that they are David Cameron or Ed Miliband on Twitter. Anyway, it runs counter to the whole Westminster mystique for political leaders to be in unmediated contact with journalists or members of the public.

And there are obvious dangers inherent in this degree of familiarity. It can all look frivolous. How dare senior politicians waste time on Twitter when they should be running the country? Some of the First Minister's critics complained at the weekend that Ms Sturgeon should have been at the Afghanistan conflict commemorations instead of tweeting about kitchens.

It is easy to tweet incorrect words or even swear words in the age of predictive text. It's difficult to encapsulate complex policies in 140 characters. And as Labour's former Shadow Attorney General, Emily Thornberry, discovered in November, just posting a photograph of a white van in a working class area can lose you your job .

Perhaps Ms Sturgeon will regret her accessibility in future when she gets a few crises under her belt. But for politicians with a sharp wit who don't mind letting their hair down I think this embracing of social media is a good thing. It's coming yet, whether we like it or not. Voters are increasingly accessing political ideas through Twitter and Facebook anyway - but not everyone likes it.

Labour's campaign manager, Douglas Alexander, used to be a big fan of social media, but this week he condemned Facebook for spreading Nationalist untruths in Scotland that have damaged Labour's electoral appeal. He said that he had encountered a social worker who actually believed the independence referendum was rigged. Well, some people did think that.

Mr Alexander is right, of course, in saying that websites like Twitter are an "echo chamber" where people tend to have their prejudices confirmed, though that applies equally to tabloid newspapers. Anyway, there are Unionist echo chambers as well as Nationalist ones.

The challenge for political parties is not to just keep feeding their own supporters with self-serving propaganda but to find ways of breaking through the barriers on social media to reach a wider public. One way is to be on it.

The trouble with the big UK parties' handling of Twitter and Facebook is that it tends to appear contrived and phoney. The one thing you cannot say about Nicola Sturgeon is that she is inauthentic.

The successful Barack Obama campaigns were very much based on social media and Labour was eager to learn from its exponents. Jim Murphy's combative chief of staff, John McTernan, is regarded as an expert in Twitter campaigning from his days as communications director for the former Australian Labour leader Julia Gillard. .

But when you are facing the kind of political crisis that the Labour party is facing in Scotland, it's hard not to think that, in some way, the technology is to blame. As with the conventional media, politicians tend to like social media as long as it is working for them. But there is no point in complaining that this is unfair.

Perhaps, in future, all politicians will have to start appearing as themselves on Twitter and Facebook, though the thought of that is somewhat terrifying. Imagine going to your computer every morning and finding that you are holding conversations with all the political leaders at once.

Social media is changing journalism in all sorts of bizarre ways. I had another Twitter moment the other day when I heard the BBC's John Beattie read out a text message about the Edinburgh University poll suggesting that 69 per cent of Scots expect Scotland to become independent. "Yet more nonsense from the YEStapo" it said.

I tweeted this because I thought it was funny rather than offensive. But a minute later I heard John Beattie read out my tweet on air and say he was sorry if he had offended anyone. I tweeted that he certainly hadn't offended me and I hadn't intended to criticise. And then he read that out, too.

This was getting too surreal for words. But perhaps this is just how broadcasting is going in the age of social media. When I used to work for the BBC all you had to worry about was the occasional grumpy letter in green ink. Welcome to the future.