Instagram Getting a list of followers

Getting a list of followers

If your app has been granted the follower_list the scope, you can request a list of users following the authenticated. This can be done trough the FollowedBy method:

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

@{

    // Make the call to the API
    InstagramGetUsersResponse response = Model.Relationships.FollowedBy();

    // List the users
    <table class="table">
        <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Username</th>
                <th>Profile picture</th>
            </tr>
        </thead>
        <tbody>
            @foreach (InstagramUserSummary user in response.Body.Data) {
                <tr>
                    <td><code>@user.Id</code></td>
                    <td>@user.FullName</td>
                    <td>@user.Username</td>
                    <td>@user.ProfilePicture</td>
                </tr>
            }
        </tbody>
    </table>

}

Each user returned by the API is represented by the InstagramUserSummary class, which only has basic information about the users. Alternatively you can see the page about getting information about a user to get more information.

Also, the Instagram API documentation is a bit sparse regarding the FollowedBy method. It seems that the method only supports showing the first page of users. If the authenticated user is following more users, the Instagram API doesn't support requesting additional pages.