ZF-8028: Get the YoutubeUser from ClientLogin
Description
Currently Youtube api provides authentication by [youtube-username, password] or by [gmail-useremail, gmail-password]. That's good, but sometimes makes troubles. Let's consider example: I logged in through ClientLogin by gmail-useremail and gmail-password. But further to deal with api I need specify youtube-username instead gmail-useremail. For instance, retrieving own videos Youtube api expects only youtube-username, not gmail-useremail. How can I get that youtube-username logging in by gmail account? I know the Youtube.com in this case returns YouTubeUser with Auth token ( see Zend_Gdata_ClientLogin::getHttpClient 146-153 ). But how can I get it in my code? It seems to me patching the ZF a little ( to save the YouTuberUser also with Auth token) is that way.
Thanks
Comments
Posted by Eugene (smileua) on 2009-10-12T06:46:47.000+0000
This patch allows to retrieve the internal Youtube username from auth requests (in case you are registered by gmail account and authenticated by gmail email/password).
There are couple notices here: - Retrieving ClientLogin instance you have to provide to Zend_Gdata_ClientLogin::getHttpClient $loginUri as ''https://google.com/youtube/accounts/…'' instead of ''https://www.google.com/accounts/ClientLogin'' (the otherwise Youtube will not provide internal username) - Also in Zend_Gdata_ClientLogin::getHttpClient you have to provide $client as instance of Zend_Gdata_YoutubeHttpClient (instances of Zend_Gdata_HttpClient don't know how to get internal youtube username) or to leave as null (in this case Zend_Gdata_ClientLogin::getHttpClient automatically creates required client type)
Posted by Eugene (smileua) on 2009-10-13T02:19:10.000+0000
I've attached patch that can fetch Youtube internal username, let's see an example
Posted by Rob Allen (rob) on 2012-11-20T20:52:38.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.