Instagram Rate limiting
Instagram Platform API deprecation
As of April 4th 2018, Instagram has suddenly decided to close down most of their Platform API. This unfortunately also means that many of the features in this package are no longer working. You can read more about the changes to the Instagram Platform API via the links below:

Platform Changelog

API and Other Platform Product Changes

Rate limiting

The Instagram API enforces rate limiting - meaning that you can only make a certain amount of request over a given time. Most methods have rather high limit, while a few methods has a very low limit. Instagram.com has a good description of limits.

If the API responds with a rate limiting error, Skybrud.Social will throw an exception of the type InstagramOAuthRateLimitException. It is highly recommended to read about error handling to properly catch this exception.

Rate limiting information

All responses from the Instagram API will contain rate limiting information - eg. as illustrated by the example below:

@using Skybrud.Social.Instagram.Responses.Locations
@inherits WebViewPage<Skybrud.Social.Instagram.InstagramService>

@{

    // Request information about a specific location (in this case our offices at Skybrud.dk)
    InstagramGetLocationResponse response = Model.Locations.GetLocation(241201111);

    // Print the rate limiting information
    <p>Rate limit: @response.RateLimiting.Limit</p>
    <p>Rate remaining: @response.RateLimiting.Remaining</p>

}