Hai all,
I need to display latest 2 tweets in my website using classic asp.
I got the following error
"An error occurred: {“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}"
Below is the my coding
<%
Function GetTimeline()
Dim objXmlHttp, nError, sHttpRequest, sTimestamp
Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
sTimestamp = DateDiff("s", "1970/01/01 00:00:00", Now())
objXmlHttp.Open "GET", "https://api.twitter.com/1.1/statuses/user_timeline.json", False
objXmlHttp.setRequestHeader "Authorization", "OAuth oauth_consumer_key=" & Chr(34) & "XXXXX" & Chr(34) & ", oauth_nonce=" & Chr(34) & "XXX" & Chr(34) & ", oauth_signature=" & Chr(34) & "XXXXXX" & Chr(34) & ", oauth_signature_method=" & Chr(34) & "HMAC-SHA1" & Chr(34) & ", oauth_timestamp=" & Chr(34) & sTimestamp & Chr(34) & ", oauth_token=" & Chr(34) & "XXXX" & Chr(34) & ", oauth_version=" & Chr(34) & "1.0" & Chr(34) &", oauth_token_secret=" & Chr(34) & "XXXXXXXXXXXX" & Chr(34)
objXmlHttp.send ""
if objXmlHttp.status = 200 Then
Response.Write objXmlHttp.responseText
Else
Response.Write "An error occurred: " & objXmlHttp.responseText
End If
End Function
GetTimeline()
%>
Thanks,
SR