Using Web-based APIs in Windows Desktop Applications

api, c#, instagram, twitter, visual-studio

Solution

Start reading about the different HTTP clients that are in the .NET Framework. If you are building a .NET 4.5 app, you can use HttpClient.

If you are using an earlier version of the .NET framework you can choose between WebClient or HttpWebRequest depending on what specifically you want to do.

I'd also highly recommend looking at a library called RestSharp, which makes working with RESTful APIs in .NET super simple (and uses HttpWebRequest internally). You can add the library to your project by installing it from NuGet.

Hope that helps.

Problem

I am currently learning Visual Studio and I want to practice by making a sample windows application that uses a web API such as Instagram, Twitter, etc. But I am confused where to start as I can't find any tutorials on how to make API calls through a desktop application using C#. Any help/links that shows how to set up a sample application and make API calls would be appreciated.

Original source