In 2008, I stood in shame outside the state capitol in California at a candlelit vigil held after the people of the liberal heartland of America voted to ban gay marriage and reinstate civil unions for gay couples. I stood in shame not because of the crushing weight of opposition, but because my own country was itself no closer to introducing full marriage rights for gay couples. I myself had fallen for the Stonewall and New Labour spin that civil partnerships were just as good as a marriage.

It's astonishing that four-and-a-half years later, with peers having passed the bill, the UK parliament has effectively decided to pass equal marriage into law, bar any last minute hiccoughs. It's all the more astonishing because it has been achieved largely without the need for candlelit vigils, and was a move backed by leaders of the three main political parties before the largest gay lobbying charity Stonewall said the law should be changed. As recently as 2009 its chief executive, Ben Summerskill, said: "There are quite a lot of gay and lesbian people who wouldn't want marriage," and that it was concerned instead with "absolutely practical hard outcomes which make a real difference to people's lives", not the mere relabeling of civil partnerships.

Although my publication, PinkNews, could not match the campaigning clout of an organisation with an annual income of £4m, when I heard this I decided that we could still utilise the power of the internet to try to change the legislative agenda. What we did was remarkably simple: Q&A sessions with all party leaders ahead of the election, to further our agenda by allowing our readers to ask them to support ending the ban on gay marriage.

Taking part first in February 2010, Nick Clegg wrote: "Love is the same straight or gay and the civil institution should be the same too." Later David Cameron, answering a personal plea from an ordinary reader, said: "I want to do everything I can to support commitment and I'm open to changing things further to guarantee equality". He later committed to consider the case for changing the law if elected prime minister, something quite a few of his candidates that became MPs clearly didn't notice. Only Gordon Brown, whose advisers told me afterwards had only ever been lobbied on this issue by Peter Tatchell, said no, civil partnerships were enough. During the Labour leadership contest, Ed Miliband, citing a PinkNews poll showing that 98% of readers wanted the right to marry, said that Labour were wrong not to have offered full marriage rights instead of civil partnerships.

It was only then that our largest gay rights charity said it would campaign for something all three party leaders had already said they would introduce. However, far from being a negative, I feel Stonewall's slowness to move was a positive thing. By remaining silent on this issue, Stonewall ensured that Cameron and Clegg adopted the cause of equal marriage because they wanted to, not because they were placed under any pressure to do so. It was a real demonstration of the power of the internet to bring the electorate and the political elite together. I believe that's why we'll never need candlelit vigils for gay rights in this country. We have a way of reaching out to politicians that they can't ignore. The cause of gay rights is immeasurably better off for it.

The Church of England is in crisis. Its position on women bishops and gay marriage has alienated much of society. Robert McCrum visits its parishes and asks if the future lies with those it has spurned