Causal relationship between those petitions and Obama speaking in favor of gay marriage is highly doubtful. Obama knew where the cards lie on this issue long ago, and was waiting for an expedient moment to revert to the position he held before he run for President. Now he decided such moment has arrived. I do not think it has anything to do with any online petitions.