<< 21st Century Classroom - Youtube EDU for Educators
In my previous posts I have written about YouTube EDU for educators, learners and its role in 21st century classroom. Today, I am going to throw some light on the technical aspect of YouTube, i.e. how it can be integrated into school websites to let schools make their own slice of YouTube.
YouTube offers many options through which its features can be incorporated into third party websites, for example, YouTube offers embeddable players for YouTube videos to be played directly from a third party website. YouTube offers its Player API to customize the playback experience, and recently, YouTube has allowed website owners to solicit user generated content from their site visitors through YouTube Direct. YouTube Direct is an opportunity for schools to engage students and teachers in academic activities in a very modern and intuitive way without writing a single line of code.
One of the strongest options provided by the YouTube for integration purposes is their Data API. By using Data API developers can add functionality to their programs or websites to search for videos, retrieve standard feed, let users upload videos and see related content. A program or a website can also authenticate itself on behalf of a user to upload videos, modify user playlists, and more.
The Data API, is essentially for developers who are programming in server-side languages and it is very useful for applications and websites who want to have a deep integration with YouTube, e.g. an app captures video from user (through a cell phone or a webcam) and uploads it directly to YouTube. The Data API gives a programmatic access to programmers to access video or user information programmatically and enabling programmers to perform actions like commenting on videos or liking a video on user’s behalf.
If you are a new to YouTube Data API then consider the following C# based example. In following example I am fetching the most viewed videos on YouTube; Plus I am authenticating the YouTube Service on behalf of a user without providing his password. This authentication type is called 2-Legged OAuth.
>> 21st Century Classroom - Cell Phones
In my future posts I shall further explore the scope of technology in the field of education. Subscribe to my blog, or follow me on twitter, to keep track of these posts.

YouTube offers many options through which its features can be incorporated into third party websites, for example, YouTube offers embeddable players for YouTube videos to be played directly from a third party website. YouTube offers its Player API to customize the playback experience, and recently, YouTube has allowed website owners to solicit user generated content from their site visitors through YouTube Direct. YouTube Direct is an opportunity for schools to engage students and teachers in academic activities in a very modern and intuitive way without writing a single line of code.
One of the strongest options provided by the YouTube for integration purposes is their Data API. By using Data API developers can add functionality to their programs or websites to search for videos, retrieve standard feed, let users upload videos and see related content. A program or a website can also authenticate itself on behalf of a user to upload videos, modify user playlists, and more.
The Data API, is essentially for developers who are programming in server-side languages and it is very useful for applications and websites who want to have a deep integration with YouTube, e.g. an app captures video from user (through a cell phone or a webcam) and uploads it directly to YouTube. The Data API gives a programmatic access to programmers to access video or user information programmatically and enabling programmers to perform actions like commenting on videos or liking a video on user’s behalf.
If you are a new to YouTube Data API then consider the following C# based example. In following example I am fetching the most viewed videos on YouTube; Plus I am authenticating the YouTube Service on behalf of a user without providing his password. This authentication type is called 2-Legged OAuth.
using System; using System.Windows.Forms; using Google.GData.Client; using Google.GData.YouTube; namespace YouTube { public partial class Form1 : Form { YouTubeService _Service; GOAuthRequestFactory _RequestFactory; //In the following URL "GoogleDevelopers" is a user id const string _VIDEOFEED = "http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed"; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-CA"); LoadService(); } private void LoadService() { //Initialize YouTube service if (_Service == null) { _Service = new YouTubeService("osamamirza.com-personalapp-1.0"); _Service.RequestFactory = GetRequestFactory(); } } public GOAuthRequestFactory GetRequestFactory() { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); if (_RequestFactory == null) { //In first two parameters you can provide any string value. _RequestFactory = new GOAuthRequestFactory("GOOGLE_OsamaMirza", "osamamirza.com-personalapp-1.0"); //You can fetch following information from Google Apps //Administration console. //Google Apps Administration //Console -> Advanced Tools -> Manage OAuth domain key _RequestFactory.ConsumerKey = "osamamirza.com"; _RequestFactory.ConsumerSecret = "xxxxxxxx-xxxxxxx"; } return _RequestFactory; } private void btnSearchChannels_Click(object sender, EventArgs e) { YouTubeQuery query = new YouTubeQuery(); //First paramter in OAuthUri's constructor is the //called the YouTube standard Feed. //Second parameter in OAuthUri's constructor is the user name, //you will be using YouTube service on behalf of this user; Good thing //here is that you don't need to know the password of the user //Third parameter is the Google Apps domain name. query.Uri = new OAuthUri(_VIDEOFEED, "username", "osamamirza.com"); //Call YouTube service's Query function to get feed back from Google YouTubeFeed feed = (YouTubeFeed)_Service.Query(query); foreach (var item in feed.Entries) { tbResult.Text += GetVideoID((YouTubeEntry)item) + " (" + item.Title.Text + ")"; } } private string GetVideoID(YouTubeEntry yte) { return yte.Id.AbsoluteUri; } } }
In my future posts I shall further explore the scope of technology in the field of education. Subscribe to my blog, or follow me on twitter, to keep track of these posts.
No comments:
Post a Comment
Your comments are highly appreciated!