Jump to content

WinHTTP & post multi FB image


 Share

Recommended Posts

Hello there, could anyone advanced in WinHTTP tell me what am I missing please?

#include "WinHttp.au3"
#include <Array.au3>
$sPic = "C:\Users\Source\Pictures\Capturex1.PNG"
$sPic2 = "C:\Users\Source\Pictures\Capturex2.PNG"
$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, "https://m.facebook.com/")
$sRead = _WinHttpSimpleFormFill($hConnect, "login.php", "login_form", "name:email", "login@mail.com", "name:pass", "pasword")
$aRead = _WinHttpSimpleFormFill($hConnect, "/groups/1111111111111", "index:1", "name:view_photo", True, "[RETURN_ARRAY]") ;<-- 11111... <-- Group ID
$aURL = _WinHttpCrackUrl($aRead[2])
$aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic, "[RETURN_ARRAY]")
$aURL = _WinHttpCrackUrl($aRead[2])
$aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], "index:0", "name:view_photo", True, "[RETURN_ARRAY]") ;<-- Suppose to press on Add More photos isn't?
$aURL = _WinHttpCrackUrl($aRead[2])
$aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic2, "[RETURN_ARRAY]") ; <-- also submit second photo?
$aURL = _WinHttpCrackUrl($aRead[2])
_WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:view_post", True)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)

I'm trying to post multi photos in group, but no luck. Here is idea I came from:

 

Link to comment
Share on other sites

Don't bump your posts until at least 24 hours have gone by.

You're specifically asking for someone advanced in WinHTTP and then not waiting for someone to even log on that MIGHT be able to help before asking again.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

So far I released that if I use Default mode at least I come up with required page, but when I post the previous image doesn't save up.

$aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic, "[RETURN_ARRAY]")
$aURL = _WinHttpCrackUrl($aRead[2])
$aRead = _WinHttpSimpleFormFill($hConnect, Default, "index:1", "name:view_photo", True, "[RETURN_ARRAY]") ;<-- So far I released that if I use Default mode at least I come up with required page, but when I post the previous image doesn't save up.
$aURL = _WinHttpCrackUrl($aRead[2])
$aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic, "[RETURN_ARRAY]")
$aURL = _WinHttpCrackUrl($aRead[2])
WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], "index:1", "name:view_post", True)

If anybody knows why is it? or at least if it's at least possible, tell me please.  I'd be very appreciate it.

Regards

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...