![]() |
|
[.NET] how to follow user without api on instagram - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] how to follow user without api on instagram (/showthread.php?tid=5421031) |
how to follow user without api on instagram - elmagek - Oct 1, 2016 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 * - Decim - Oct 1, 2016 Code *instagram*com* - elmagek - Oct 1, 2016 (Oct 1, 2016 04:47 AM)Arcanecfg Wrote: I have no authority to publish links or pictures or video on the Forum Rules * - Decim - Oct 1, 2016 (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. * - Ninja - Oct 1, 2016 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. * - elmagek - Oct 1, 2016 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 * - elmagek - Oct 3, 2016 up up up up up up up upup up * - Ninja - Oct 3, 2016 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. * - elmagek - Oct 3, 2016 What should I do in order to find help? * - Ninja - Oct 3, 2016 (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. * - elmagek - Oct 3, 2016 But I do not have the money! ? i fixed it :D thanks all please close the thread * - Ninja - Oct 4, 2016 (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. * - idb. - Oct 4, 2016 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. * - elmagek - Oct 4, 2016 i fixed it :D thanks all please close the thread * - i_pokorny - Nov 27, 2016 @elmagek How were you able to do that ? (Oct 4, 2016 11:49 AM)elmagek Wrote: i fixed it :D thanks all How were you able to get it done? |