Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.


2 Answers

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.

like image 55
Reza Shahrestani Avatar answered Dec 10 '25 23:12

Reza Shahrestani


I fixed the issue by changing the proxy server. It seems Instagram was banning my IP for no reason!


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!