Reputation: 21
I'm learning InstaSharper, but I can't understand how to Follow/Unfollow user. Because UnFollowUserAsync
requires UserId. Can you tell me please how to get User's ID, or maybe there are other ways to follow/unfollow users.
Thanks in advance
Upvotes: 0
Views: 596
Reputation: 21
Pk
returns user Id in InstaSharp
.
IResult<InstaUserInfo> a = await
api.GetUserInfoByUsernameAsync(/*username*/"asfasv");
var id = a.Value.Pk;
Other Example:
var nextUri = UriCreator.GetUserFollowingUri(user.Value.Pk, _user.RankToken, searchQuery,
userListResponse.Value.NextMaxId);
For more details: UserProcessor
Upvotes: 1