TemperMichael / Instagram-API-Xamarin

An example project which allows you to login on Instagram and get data from the endpoints of the Instagram API.
5 stars 3 forks source link

Instagram-API-Xamarin

A project in Xamarin which allows you to login on Instagram and get data from the endpoints of the Instagram API.

Screenshots

Documentation

What's included

With this project you have a template to start with, when you want to work with the Instagram API in Xamarin. You get:

How to use it

It's pretty easy to use the project. First you have to create a developer account on Instagram and then you can create a new set of client credentials for your app. After that open the "Constants" class in the Instagram API folder and insert the data of your client in the following lines.

// Your client id. You get it from your registered client on Instagram. (https://www.instagram.com/developer/clients/manage/)
public static string ClientId =  "eefbf801250e4611880cbf07417ef780";

// Specify what you want to access from the Instagram API. I didn't use all of them in this example.
// For more scope parameters look at the Instagram API documentation. (https://www.instagram.com/developer/authorization/)
public static string Scopes = "basic public_content likes";

// The authorization URL of Instagram. Note that I use client-side authentication in this example.
// Change the response_type to "code" to use server-side authentication. (https://www.instagram.com/developer/authentication/)
// Don't forget to insert your client_id and redirect_uri in the url.
public static string AuthorizationUrl = "https://api.instagram.com/oauth/authorize/?client_id=eefbf801250e4611880cbf07417ef780&redirect_uri=https://localhost:3000/callback&response_type=token";

// Your redirect URI. The URI must match with the registered redirect URI of your Instagram client. (https://www.instagram.com/developer/clients/manage/)
public static string RedirectUri = "https://localhost:3000/callback";

And that's it! Just run the project and everything works with your data! Please take also a look at the notes, since they are quite important.

Helpful Links

Notes