Twitter Pfofilbild ändern

  • Guten Abend zusammen

    Ich bin leicht am Verzweifeln, ich wollte für nen Kumpel nen Programm schreiben womit er bei Twitter sein Profilbild ändern kann, mit dem Hintergrund es automatisch in bestimmten Zeitintervallen wecheln zu lassen
    ich hatte das ganze versucht mit der API von Twitter zu lösen, das hat aber bei mir net hingehaun also frag ich euch wie könnte ich das machen??

    das is was ich mir schon zusammengeschustert hab( klappt aber net):

    Spoiler anzeigen
    [autoit]

    #include "DllCallBack.au3"

    [/autoit] [autoit][/autoit] [autoit]

    Global Const $CURLOPT_URL = 0x2712
    Global Const $CURLOPT_WRITEDATA = 0x2711
    Global Const $CURLOPT_WRITEFUNCTION = 0x4E2B
    Global Const $CURLOPT_PROGRESSFUNCTION = 0x4E58
    Global Const $CURLOPT_NOPROGRESS = 0x2B
    Global Const $CURLOPT_ERRORBUFFER = 0x271A
    Global Const $CURLOPT_TRANSFERTEXT = 0x35
    Global Const $CURL_ERROR_SIZE = 0x100
    Global Const $CURLOPT_USERPWD = "CURLOPT_USERPWD"
    Global Const $CURLOPT_POST = "CURLOPT_POST"
    Global Const $CURLOPT_POSTFIELDS = "CURLOPT_POSTFIELDS"
    Global Const $CURLINFO_HTTP_CODE = "CURLINFO_HTTP_CODE"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $hDll_LibCurl = DllOpen("libcurl.dll")

    [/autoit] [autoit][/autoit] [autoit]

    $api_url = 'http://twitter.com/post.xml'

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $hCurlHandle = DllCall($hDll_LibCurl, "ptr:cdecl", "curl_easy_init")
    $hCurlHandle = $hCurlHandle[0]

    [/autoit] [autoit][/autoit] [autoit]

    $URL = DllStructCreate("char[256]")
    DllStructSetData($URL, 1, $api_url)
    $PW = DllStructCreate("char[256]")
    DllStructSetData($URL, 1, "<Benutzername>:<Passwort>")
    $Bild = DllStructCreate("char[256]")
    DllStructSetData($URL, 1, "profile_image_uploaded_data=keyle.de/keyle.png")

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_URL, "ptr", DllStructGetPtr($URL))
    DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_USERPWD, "ptr", DllStructGetPtr($PW))
    DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "wstr", $CURLOPT_POSTFIELDS, "ptr", DllStructGetPtr($Bild))
    DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "wstr", $CURLOPT_POST, "uint", 1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_exec", "ptr", $hCurlHandle)
    MsgBox(0,"",DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_getinfo", "ptr", $hCurlHandle, "wstr",$CURLINFO_HTTP_CODE))

    [/autoit]

    Hoffe inständig ihr könnt mir Helfen

    Mfg Keyle