Getting a list of users the authenticated user is following
If your app has been granted the follower_list
the scope, you can request a list of users the authenticated user is following. This can be done trough the Follows
method:
@using Skybrud.Social.Instagram.Objects.Users
@using Skybrud.Social.Instagram.Responses.Users
@inherits WebViewPage<Skybrud.Social.Instagram.InstagramService>
@{
InstagramGetUsersResponse response = Model.Relationships.Follows();
<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 Follows
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.