Search code examples
c#winformsinstasharp

How to follow a user with InstaSharp in C#


I have a problem with following a user on Instagram with InstaSharp Here is my code:

private async void Follow()
{
    var followMe = await api.FollowUserAsync(userID);
    if (followMe.Succeeded)
    {
        MessageBox.Show("Followed");
    }
    if (!followMe.Succeeded)
    {
        MessageBox.Show(followMe.Info.Message);
    }
}

And when I call this method in the messageBox it says feedback_required. How can I fix this?

Also : other functions like Unfollow Login LogOut are working fine I just have problem with Follow function.


Solution

  • Some specific countries ip's will banned in situation like this as you said.

    You can use proxies inside your program for this problem if your customers are from those countries.

    C# Connecting Through Proxy

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create("[ultimate destination of your request]");
    WebProxy myproxy = new WebProxy("[your proxy address]", [your proxy port number]);
    myproxy.BypassProxyOnLocal = false;
    request.Proxy = myproxy;
    request.Method = "GET";
    HttpWebResponse response = (HttpWebResponse) request.GetResponse();
    

    I hope this helps you.