I have to do some requests with instasharp but I don't know how to do it, I tried something after searching on the site but it makes Visual Studio freeze.
Here is my code, in this one I just want to make a simple request (getting location by their latitude and longitude) in order to learn how does it work.
So I created a config with my client and my secret, and I used it to create a Location Endpoint
. But after doing result1.Wait()
, it freezes.
var clientID = "Myclient";
var clientSecret = "Mysecret";
InstaSharp.InstagramConfig config = new InstaSharp.InstagramConfig(clientID, clientSecret);
var location = new InstaSharp.Endpoints.Locations(config);
var result1 = location.Search(45.759723, 4.842223);
result1.Wait();
foreach (InstaSharp.Models.Location l in result1.Result.Data)
{
MessageBox.Show(l.Name);
}
Have you any solutions or tips I could use? Thank you for your help.