nofire Posted November 9, 2014 Share Posted November 9, 2014 (edited) Hi ! I'd like to connect to Iconosquare with HTTPRequests But to connect to Iconosquare you need to connect to Instagram first (Iconosquare redirects you) Once you connected to your instagram account it redirects you to Iconosquare I got that already : $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $ConnectLink = 'https://instagram.com/oauth/authorize?client_id=d9494686198d4dfeb954979a3e270e5e&redirect_uri=http%3A%2F%2Ficonosquare.com&response_type=code&scope=likes+comments+relationships' $ConnectLink2 = 'https://instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize%3Fclient_id%3Dd9494686198d4dfeb954979a3e270e5e%26redirect_uri%3Dhttp%253A%252F%252Ficonosquare.com%26response_type%3Dcode%26scope%3Dlikes%2Bcomments%2Brelationships' $oHTTP.Open("GET",$ConnectLink,False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $String = StringSplit($oReceived,'name="csrfmiddlewaretoken" value="',1) $String2 = StringSplit($String[2],'"',1) $Token = $String2[1] $Cookie = $oHTTP.GetAllResponseHeaders $sPD = "csrfmiddlewaretoken=" & $Token & "username=USERNAME&password=PASSWORD" $oHTTP.Open("POST",$ConnectLink2,False) $oHTTP.SetRequestHeader("Cookie","mid=VF-FtQAEAAH_rwL_DtMTOaq12uYs; csrftoken=" & $Token) $oHTTP.SetRequestHeader("User-Agent","User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sPD) $oReceived = $oHTTP.ResponseText $Cookie = $oHTTP.GetAllResponseHeaders $file = FileOpen("Received.html", 2) FileWrite($file, $oReceived) FileClose($file) And I get that kind of error : This page could not be loaded. If you have cookies disabled in your browser, or you are browsing in Private Mode, please try enabling cookies or turning off Private Mode, and then retrying your action. Do you have any ideas on how I could do that ? Edited November 10, 2014 by nofire Link to comment Share on other sites More sharing options...
nofire Posted November 9, 2014 Author Share Posted November 9, 2014 Bump, I really need help please Link to comment Share on other sites More sharing options...
nofire Posted November 10, 2014 Author Share Posted November 10, 2014 Bump Link to comment Share on other sites More sharing options...
AutID Posted November 10, 2014 Share Posted November 10, 2014 (edited) Here you go: http://instagram.com/developer/# You will have all the help you need there. Edited November 10, 2014 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
MikahS Posted November 10, 2014 Share Posted November 10, 2014 Also, for future's sake. Please wait 24 hours to bumb your own thread nofire. Thank you Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
bradlo Posted May 16, 2019 Share Posted May 16, 2019 In this line of code: $String = StringSplit($oReceived,'name="csrfmiddlewaretoken" value="',1) should value=" ' be value="" ' instead? Link to comment Share on other sites More sharing options...
bradlo Posted May 16, 2019 Share Posted May 16, 2019 2 minutes ago, bradlo said: nvm that's right Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now