hi ,
I need your help , I want to know how to hit twitter API in autoit for Post Retweet a tweet . As I am new in this field I am not able to understand.
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "https://api.twitter.com/2/users/1531500716577419264/retweets", False)
$oHTTP.Send()
Local $arr[7] = ["OAuth oauth_consumer_key=pnIMwqNZnB0ACYfFrlBikJNkE","oauth_token=1531500716577419264-8LQ2pzEdZORqBn1MIqXEZeNlthObbo","oauth_signature_method=HMAC-SHA1","oauth_timestamp=1654067601","oauth_nonce=tK85msdw4G1","oauth_version=1.0","oauth_signature=33KsURODsy9gUi5xFa%2FsM2Ac8vo%3D"]
For $i = 0 to 7 - 1 ;
ConsoleWrite($arr[$i] & @LF)
Next
$tweet_id=FileRead( "1531198564613124096")
Global $ObjLevel = -1
Global $object = Json_Decode($tweet_id)
Json_Dump($tweet_id)
$oHTTP.Send($tweet_id)
$oReceived = $oHTTP.ResponseText
$oStatusCode = $oHTTP.Status
If $oStatusCode <> 200 then
MsgBox(0, "Response code", $oStatusCode)
EndIf
$file = FileOpen("", 2) ;
FileWrite($file, $oReceived)
FileClose($file)