user6845869
user6845869

Reputation:

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.

Upvotes: 3

Views: 731

Answers (2)

user6845869
user6845869

Reputation:

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

Upvotes: 1

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.

Upvotes: 1

Related Questions