tianshanxuester / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

Add documentation/comments for uploading to YouTube using Gmail accounts #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It took me some times to figure out how you can upload videos to YouTube using 
the GData 
framework with a Gmail account. I found no documentation online and there is no 
comment in 
the GData framework sources explaining how to do that.

--------

Steps to reproduce:

- Create a Gmail account.
- Go to YouTube.com and use the Gmail account to log in. It will create a 
YouTube account 
linked to your Gmail account.
- Use your Gmail account in your application using the GData framework to 
upload videos to 
YouTube.

--------

Expected result:

When using a Google account to upload video to YouTube, some functions of the 
GData 
Objective-C require the Gmail account as parameter and some require 
the YouTube linked account as parameter. 

When you call '- (void)setUserCredentialsWithUsername:(NSString *) 
username password:(NSString *)password;' in GDataServiceBase, the 
username should be the Gmail account, for example 
'x...@googlemail.com' and the password should be the password of the 
Gmail account.

But when you call '+ (NSURL *)youTubeUploadURLForUserID:(NSString *) 
userID clientID:(NSString *)clientID;' in GDataServiceGoogleYouTube, 
the userID parameter should be the YouTube linked account and the 
password the password of the Gmail account.

Original issue reported on code.google.com by colu...@gmail.com on 8 Apr 2009 at 5:07

GoogleCodeExporter commented 9 years ago
There's now a comment about this in the YouTube service header, and a bug filed
internally against the YouTube docs.

Original comment by gregrobbins on 29 Apr 2009 at 2:10

GoogleCodeExporter commented 9 years ago
the underlying problem is still not fixed. is the bug being tracked elsewhere?
uploading to YouTube from iPhone for certain accounts requires 3 user fields. 
not
acceptable.

Original comment by myleasto...@gmail.com on 26 May 2010 at 6:01

GoogleCodeExporter commented 9 years ago
The public YouTube API bug list is
http://code.google.com/p/gdata-issues/issues/list?can=2&q=youtube

The Google internal bug number for this is 1781433

Original comment by grobb...@google.com on 26 May 2010 at 6:16

GoogleCodeExporter commented 9 years ago
I think the only password required now is the Google password for linked 
accounts, or the YouTube password for 
non-linked accounts, but the YouTube API folks would be able to answer 
definitively.

Original comment by grobb...@google.com on 26 May 2010 at 6:18

GoogleCodeExporter commented 9 years ago
you are correct that only one password is required. however 2 usernames are 
sometimes
required depending on whether the account was linked to a google account or 
not. 

the call to youTubeUploadURLForUserID always requires the youtube username 
whereas
the call to setUserCredentialsWithUsername requires the google username if the
account was linked and the youtube username if it was not. 

super awkward.

Original comment by myleasto...@gmail.com on 26 May 2010 at 6:25

GoogleCodeExporter commented 9 years ago
i discovered the solution: when calling youTubeUploadURLForUserID, you can pass
"default" for the username to denote the current logged in user. when using a
google-linked account you MUST pass "default" for the username here.

Original comment by myleasto...@gmail.com on 26 May 2010 at 7:43

GoogleCodeExporter commented 9 years ago
Interesting; thanks.

Original comment by grobb...@google.com on 26 May 2010 at 7:56

GoogleCodeExporter commented 9 years ago
Thank you so much.. you solved my error... 

Original comment by innodeas...@gmail.com on 12 Jun 2012 at 9:04