Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

how to follow user without api on instagram

how to follow user without api on instagram ?

i try this code but return error 404

[php]
Public Function Follow(name As String) As Boolean
Try
Dim id As String = GetIDProfile(name)
Dim csrf As String = returnCSRFToken("*instagram*com/" & name)
Dim post As String = ""
Dim request As HttpWebRequest = DirectCast(WebRequest.Create((Convert.ToString("*instagram*com/web/friendships/") & id) + "/follow/"), HttpWebRequest)
request.Method = "POST"
request.Host = "www*instagram*com"
request.KeepAlive = True
request.ContentLength = 0
request.Accept = "*/*"
request.Headers.Add("Origin", "*instagram*com")
request.Headers.Add("X-Requested-With", "XMLHttpRequest")
request.Headers.Add("X-Instagram-AJAX", "1")
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
request.Headers.Add("X-CSRFToken", csrf)
request.Referer = (Convert.ToString("*instagram*com/") & name) + "/"
request.Headers.Add("Accept-Encoding", "gzip, deflate, br")
request.Headers.Add("Accept-Language", "en-US,en;q=0.8")
request.Headers.Add("Cookie", "sessionid=" & IGSessionIDLogin & "; s_network=; ig_pr=0.8999999761581421; ig_vw=1517; csrftoken=" & csrf & "; ds_user_id=" & LoggedOnID)
Dim postBytes As Byte() = Encoding.ASCII.GetBytes(post)
request.ContentLength = postBytes.Length
Dim requestStream As Stream = request.GetRequestStream()

requestStream.Write(postBytes, 0, postBytes.Length)
requestStream.Close()

Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)

Dim html As String = New StreamReader(response.GetResponseStream()).ReadToEnd()

Console.WriteLine(html)
Return html.Contains("""result"": ""following""")
Catch ex As Exception
MessageBox.Show(ex.Message)
Return False
End Try
End Function
Code
*instagram*com
That's a nice URL right there.

For the glory of humanity
(Oct 1, 2016 04:47 AM)Decim Wrote:  
Code
*instagram*com
That's a nice URL right there.

I have no authority to publish links or pictures or video on the Forum Rules
(Oct 1, 2016 05:47 AM)elmagek Wrote:  I have no authority to publish links or pictures or video on the Forum Rules

Since you're getting a 404, it's almost certain that the reason is a broken URL.
Recheck the POST URL.
Code
("*instagram*com/web/friendships/") & id) + "/follow/")

Update; If you're grabbing the id at runtime, that's probably it.

For the glory of humanity
First of all, you didn't close the PHP tag in the OP.
Second, check the response of the webexception. Read it to a string and see if it tells you anything.
Third, just use the CookieContainer, it handles the cookies automatically for you.
i used codes from this url
github.com/sdkayy/Kek

can any person help me for that?


up up up up up up up upup up
up up up up up up up upup up
So I offered help. I told him what his problem was and I coded the entire function for him, all but the postdata because I dont remember that by heart.
He said "but I didn't ask you to code the whole function". What a fucking ungrateful cunt.
I told him he just needed to find the postdata for the follow function and he wanted me to do that as well.
OP just wants to be spoonfed the code.
What should I do in order to find help?
(Oct 3, 2016 08:14 AM)elmagek Wrote:  What should I do in order to find help?

In order to have someone make it for you, you mean.
And that is pay money.
But I do not have the money! ?


i fixed it :D thanks all

please close the thread
(Oct 3, 2016 03:29 PM)elmagek Wrote:  But I do not have the money! ?

And we dont have the will to help someone who just asks for code to be spoonfed. We don't owe you anything. You cant just come in here and demand help. If you have a small issue and ask nicely, sure. If you want us to do all the work for you, you have to offer something in return.
The rate limits for liking, following, etc on the www of the service are pretty terrible last time I checked. You could perform actions in simultaneous "bursts" to get by that, but chances are they are hip to that now. You're better off using the 99% documented "private" API and just acting as an android/ios device. It's really pretty simple tbh.
Need a custom software? Check out my freelance service here! 6+ years and counting, never a complaint :)

STOP STEALING CODE.

FREE NATHAN

People who report posts are lamers.
i fixed it :D thanks all

please close the thread
@elmagek How were you able to do that ?


(Oct 4, 2016 11:49 AM)elmagek Wrote:  i fixed it :D thanks all

please close the thread

How were you able to get it done?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by GlushkoJun 13, 2018 11:13 PM 3 642 Jun 13, 2018 11:13 PM
Last Post: hostov
[C#] by itcorpJan 2, 2018 10:57 AM 3 313 Jan 2, 2018 10:57 AM
Last Post: HFDone
[C#] by itcorpDec 14, 2017 06:11 AM 0 189 Dec 14, 2017 06:11 AM
Last Post: itcorp