我正在使用InstaSharp尝试获取用户的最新媒体帖子。我收到错误:
{"Exception has been thrown by the target of an invocation."}
这是我的代码:
public async Task<string> GetUserRecentMedia(string userId)
{
string response = string.Empty;
try
{
InstagramConfig config = new InstagramConfig(ClientId, ClientSecret, RedirectUri, string.Empty);
Users usersEndpoints = new Users(config);
response = ConvertToJson(usersEndpoints.Recent(userId));
}
catch (Exception ex) { }
return response;
}