Hello Fellow AutoIt Fans,
Does anyone have an example of some code, that they are willing and able to share herein, that actually allows you to successfully get an oAuth authentication and successfully perform a Search of Tweets using the Twitter API V1.1?
I have tried using the code that DeltaRocked referenced in the Post at:
However, I have discovered that the value of $nonce being returned by the statement = $nonce = StringTrimLeft(_Crypt_HashData($epoch & $sTwitter_oAuth_Consumer_key, $CALG_MD5), 2) in the gen_sig_base Function is different from the oauth_nonce returned by Twitter’s OAuth Tool at: https://dev.twitter.com/oauth/tools/signature-generator
And even if I set $nonce equal to the oauth_nonce returned by Twitter’s OAuth Tool and $epoch equal to the oauth_timestamp returned by Twitter’s OAuth Tool, the $Signature returned by the statement = $Signature = hmac( $sTwitter_oAuth_Consumer_key & ':' & $sTwitter_ConsumerSecret, $SignatureBase, 'sha1') in the gen_sig_base Function is different from the oauth_signature returned by Twitter’s OAuth Tool … Does anyone know why?
And I subsequently always get a response $sReturned ={"errors":[{"message":"Could not authenticate you","code":32}]}, @error =0 from the request using the values of $nonce and $Signature returned by the gen_sig_base Function.
However, I was previously able to successfully get the Tweet Search results returned if I “hardcoded” the oauth_nonce and oauth_signature values returned by Twitter’s OAuth Tool into the request so …
Does anyone know what is wrong in/with the gen_sig_base Function? And/or changed in the Twitter API V1.1? causing these authentication failures? And/or the values of $nonce and $Signature returned by the gen_sig_base Function being different from the oauth_nonce and oauth_signature values returned by Twitter’s OAuth Tool, for the same $epoch value?
Any and all of your responses and assistance with being able to successfully automate Twitter Searches using AutoIt would be Most Appreciated!
Thank you and Have a Great Day!
- Michael S. DeVries