Does anyone have any idea why the code below throws up an error 32 on the Twitter 1.1 API?
I don’t profess to understand twitters API’s very well, my skills lie elsewhere, but would really love to work out what is wrong with this.
<%
Dim objOAuth : Set objOAuth = New cLibOAuth
objOAuth.ConsumerKey = "XXXXXX"
objOAuth.ConsumerSecret = "XXXXXX"
objOAuth.EndPoint = "https://api.twitter.com/1.1/statuses/update.json"
objOAuth.Host = "api.twitter.com"
objOAuth.RequestMethod = "POST"
objOAuth.UserAgent = "OAuth gem v0.4.4"
objOAuth.Parameters.Add “oauth_token”, "XXXXXXX"
objOAuth.Parameters.Add “oauth_token_secret”, "XXXXXX"
objOAuth.Parameters.Add “status”, Server.URLEncode(“This is a test Message”)
objOAuth.Send()
Dim strResponseText : strResponseText = objOAuth.ResponseText
Dim strErrorCode : strErrorCode = objOAuth.ErrorCode
If Not IsNull(strErrorCode) Then
Response.Status = RESPONSE_STATUS_500
Response.Write strErrorCode
Else
Response.ContentType = "text/html"
Response.CharSet = "utf-8"
Response.Write strResponseText
End If
%>
If I change the code to post to V1, I get the following back
{“error”:“Could not authenticate with OAuth.”,“request”:"/1/statuses/update.json?oauth_consumer_key=XXXXXX&oauth_nonce=1432948037&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1369586161&oauth_token=XXXXXX&oauth_token_secret=XXXXXX&oauth_version=1.0&status=This%2Bis%2Ba%2Btest%2BMessage&oauth_signature=6UiRckJoMfsA86wwQE8%2FWAJ8k3Y%3D"}