با سلام دوستان من از ویژوال استودیو دات نت 2019 استفاده میکنم یه سورس میخوام که بشه به انستاگرام وصل بشه یعنی یوزر و پسوورد رو که درست وارد کردم زدم پیغام نشسون بده درسته اگر هم اشتباه باشه بگه اشتباه هستش از چندین کد استفاده کردم منتها نوشته بود واسه سال 2013 به بعد دیگه عوض شده ممنون میشم کمک کنید
اونجایی که متن رو زخیم کردم اونجا رو خطا میده
  Dim cc As New CookieContainer
Dim HWR As HttpWebRequest
Dim HWP As HttpWebResponse
Public Function Toresponse(ByVal url As String, ByVal refer As String) As String
HWR = CType(HttpWebRequest.Create(url), HttpWebRequest)
HWR.CookieContainer = cc
If refer <> "" Then
HWR.Referer = refer
End If
HWP = CType(HWR.GetResponse(), HttpWebResponse)
Return New StreamReader(HWP.GetResponseStream()).ReadToEnd
End Function
Public Function ToResponse(ByVal url As String, ByVal post As String, ByVal refer As String) As String
HWR = CType(HttpWebRequest.Create(url), HttpWebRequest)
HWR.Method = "post"
HWR.CookieContainer = cc '10.0 version browser
HWR.UserAgent = "Applewebkit/537.36 (KHTML, Like Gecko)=Mozilla/10.0 Windows/NT 6.1 Chrome/28.0.1468.0 Safari/537.36"
If refer <> "" Then
HWR.Referer = refer
End If
Dim bytearr() As Byte = Encoding.Default.GetBytes(post)
HWR.ContentLength = bytearr.Length
Dim datastream As Stream = HWR.GetRequestStream()
datastream.Write(bytearr, 0, bytearr.Length)
HWP = CType(HWR.GetResponse(), HttpWebResponse)
Return New StreamReader(HWP.GetResponseStream()).ReadToEnd
End Function

 Dim html As String = Toresponse("https://www.instagram.com/accounts/login/", "")
Dim token As String = html.Substring(html.IndexOf("csrfmiddlewaretoken") ).Split(""""c)(2)
Dim uname As String = txtUsername.Text
Dim upwd As String = txtPassword.Text
Dim SB As New StringBuilder
SB.Append("csrfmiddlewaretoken=" & token)
SB.Append("&username" & uname)
SB.Append("csrfmiddlewaretoken=" & token)
SB.Append("&password" & upwd)
html = ToResponse("https://www.instagram.com/accounts/login/", SB.ToString, "https://www.instagram.com/accounts/login/")
If html.Contains("""username"":""" & uname) Then
MsgBox("login Successfully", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Login")
ElseIf html.Contains("Please Enter a correct username and password.") Then
MsgBox("Invalid username or password", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Invalid")
Else
MsgBox("Unble login account", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "Unable")
End If