Response from OAuth is "?"


The past few days my twitter application has stopped working on both of my websites. I’m using classic asp as the language and this function from Scott DeSapio’s OAuth library no longer works. The responseText I receive is just “?”, no json or xml response. Everything was working fine a few days ago but now it’s completely useless. Any help?

Public Sub Send()
	Dim strRequestURL : strRequestURL = Get_RequestURL()
	On Error Resume Next
	Dim objXMLHTTP : Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")
	objXMLHTTP.Open m_strRequestMethod, strRequestURL, False
	objXMLHTTP.SetRequestHeader "Content-Type","application/x-www-form-urlencoded"
	If Err.Number <> 0 Then
		Select Case CStr(Err.Number)
				Response.Redirect m_strTimeoutURL
			Case Else
				m_strErrorCode = Err.Number
		End Select
		m_strResponseText = objXMLHTTP.ResponseText
	End If
	Set objXMLHTTP = Nothing
	On Error Goto 0
End Sub

The objXMLHTTP.ResponseText just contains “?” and not a error or anything else. I’ve been fiddling with this and I can’t see where the issue is. I know that you guys have made HTTP standards more strict but it looks like I’m sending all the correct/valid HTTP headers. Content-Length is generated correctly, the server time is correct, I’ve checked the hostname in the headers as well and that’s fine.


We’re looking into this issue. Our current theory is that this is related to a bug where gzip’d responses are being served due to a specific User agent or perhaps some other criteria. The first character of our gzip responses tend to be “?” which kind of matches up with this scenario. Are you setting an explicit User-Agent HTTP header? If so, do you know what it is?


Thanks for the fast response, I’m not specifically setting an User-Agent header, if there is one specified, it was sent automatically with the other default http headers.


Hey have you guys been able to find the source of this bug yet?


Still under investigation.


Alright thanks. Is there anything else I could provide to help fix this?


Hi Brian,

Feel free to use my ASPTwitter class as a starting point. The code already does OAuth authentication and gets tweets, and works with Twitter API 1.1. Just copy the token method and change the API URL and post data:


Hi – see my reply below. :slight_smile: