我在使用 InstaSharp 關(guān)注 Instagram 上的用戶時(shí)遇到問(wèn)題 這是我的代碼:private async void Follow(){ var followMe = await api.FollowUserAsync(userID); if (followMe.Succeeded) { MessageBox.Show("Followed"); } if (!followMe.Succeeded) { MessageBox.Show(followMe.Info.Message); }}當(dāng)我在 messageBox 中調(diào)用此方法時(shí),它會(huì)顯示 Feedback_required。我怎樣才能解決這個(gè)問(wèn)題?另外:其他功能(例如取消關(guān)注登錄注銷)工作正常,我只是關(guān)注功能有問(wèn)題。
1 回答
楊魅力
TA貢獻(xiàn)1811條經(jīng)驗(yàn) 獲得超6個(gè)贊
正如您所說(shuō),在這種情況下,某些特定國(guó)家/地區(qū)的 IP 將被禁止。
如果您的客戶來(lái)自這些國(guó)家/地區(qū),您可以在程序內(nèi)使用代理來(lái)解決此問(wèn)題。
C# 通過(guò)代理連接
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();
我希望這可以幫助你。
- 1 回答
- 0 關(guān)注
- 147 瀏覽
添加回答
舉報(bào)
0/150
提交
取消
