This is a Excel VB application the actual sending of the command is done by this
Dim objRest As WinHttp.WinHttpRequest
Set objRest = New WinHttp.WinHttpRequest
objRest.Open "POST", "https://api.twitter.com/1.1/statuses/update.json", False
objRest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objRest.setRequestHeader "Authorization", strHeader
objRest.Send "status=" & "TextofTweet"
Which works fine and the tweet is sent, I know my key/token and access token/secret, are valid.
However If I change the objRest.Send command to
objRest.Send “status=” & “TextofTweet” & “&in_reply_to_status_id=989204711994781696”
it fails with the authorization error I mentioned, Response Text: {“errors”:[{“code”:32,“message”:“Could not authenticate you.”}]}.
the Authorization header above , strHeader is generated by the following,
'create basestring
tmpBase = “oauth_consumer_key=” & cnsOauthConsumerKey
tmpBase = tmpBase & “&” & “oauth_nonce=” & strNonce
tmpBase = tmpBase & “&” & “oauth_signature_method=” & cnsMethod
tmpBase = tmpBase & “&” & “oauth_timestamp=” & strTimestamp
tmpBase = tmpBase & “&” & “oauth_token=” & cnsOauthToken
tmpBase = tmpBase & “&” & “oauth_version=” & cnsOauthVersion
tmpBase = tmpBase & “&” & “status=” & strStatus
tmpBase = tmpBase & “&” & “in_reply_to_status_id=989204711994781696” (Again if I add this line it fails)
basestring = cnsAPIMethodP & “&” & UrlEncode((cnsURLPost)) & “&” & UrlEncode(tmpBase)
Then from the base string to generating the the Authorization header everything is the same. With the above snippets can you see anything wrong? The rest of the code is the same and works if I do not make the two changes above adding the “&in_reply_to_status_id=989204711994781696”
Thanks for the help,