Using Youtube API with Xamarin Forms

Sign in to queue

Description

Learn how to use Youtube Data API to retrieve videos from a channel or from a playlist, with Xamarin Forms. The video will walk you through all the required steps to show information about youtube videos in a Xamarin Forms page:

1) Get API Key to access Youtube Data API.

2) How to invoke URL endpoint to get videos.

3) Create Data Objects.

4) Parse JSON data coming from Youtube API.

5) Show retrieved videos data in a ListView.

The resulted code runs on Android, iOS and Windows mobile platforms.

Tags:

C#, JSON, MVP, REST, Xamarin

Embed

Download

Download this episode

The Discussion

  • User profile image
    russtoolshed

    Awesome video! Just what I as looking for. I am only getting a couple of videos in my playlist instead of the entire list of 20. Looks like it is catching an exception in the GetVideosDetailsAsync loop for a null value. "Value cannot be null.
    Parameter name: source" Looks like, if there are no tags for a video, it will blow up. So, I just commented this line out for now at about line 169 in YoutubeViewModel.cs:

    Tags = (from tag in snippet?.Value<JArray>("tags") select tag.ToString())?.ToList(),

    Also, when changing the Thanks for posting this!

Add Your 2 Cents