For the fact that they generate dirty HTML code. It was a good experience to never have used an editor when I first learned HTML. It was purely all tags. Once editors started coming out, and the one that I frequently use is Microsoft Frontpage, the only thing that I find useful in them is creating nested tables. With that, I don’t have to worry about having incomplete ending tags. Other than that, I prefer clean HTML tag creation. These days, I am more into programming than designing, that’s why I don’t these editors. If I was more into designing, then I’d find programs like Macromedia’s Dreamweaver to be pretty useful.

To retrieve list of video feeds from a user from Google, include the init() method from this post. Then use the method below to get the title of the video and the URL. This sample code retrieves the video feed list of the logged-in user. To retrieve the list of video feeds for other users, check the user guide.

To get an image of the video thumbnail like what you in the YouTube site, get the String after this URL,

Then use that same string to get the thumbnail image of the video using this URL,

It is always default.jpg so just change where I placed GET_THIS_STRING. Easy as pie.

Google YouTube API lets users who want their web applications to be able to upload videos to the YouTube site as well as displaying the user’s uploaded videos. First things first. As the developer, you need to get a developer’s key. You need this to be able to perform write or upload video operations. Go over to this link. Once you have finished submitting your developer information, you need to register a product in order to get a developer key. Once you’ve finished registering, you actually also get a ClientID aside from the developer key. You need both of these two in your code.

To start with, we need to initialize a YouTubeService object which we use for account validation.

Then we call this method

The setFormDetails() method sets two variables token and formUrl which are required values in your HTML form fields. The formUrl would serve as your action URL of the form tag while the token variable will be a hidden field. The action URL must also append a nexturl parameter in order for your browser to redirect it to that URL after upload is finished. Your HTML form field would look like this:

Within the setFormDetails() method, the YouTubeNamespace.CATEGORY_SCHEME lets you specify which Category the video will be set as. This method is purely manual. You can create your own form page with title, description and category that lets the user sets it according to his preference. Just make sure those values are not empty because as they are required by the YouTubeAPI.

Related Posts Plugin for WordPress, Blogger...