Force PHP to use a Google Account in ClientLogin


Sometimes you have a Google Apps account that is also registered as a Google Account and you want to make sure you are logging in as the Google Account, especially when you want to use a service like Picasa Web Albums that does not have an Apps version. To do this using ClientLogin you need to do something like:
$serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$username = "user@gmail.com";
$pass = "password";
$accountType = "GOOGLE";


$client = Zend_Gdata_ClientLogin::getHttpClient($username, $pass, $serviceName, null, Zend_Gdata_ClientLogin::DEFAULT_SOURCE, null, null, Zend_Gdata_ClientLogin::CLIENTLOGIN_URI, $accountType);