搜索推文的简单拉动需要我在尝试通过经典 ASP 帖子获取不记名令牌时遇到困难。
服务器响应 403 无法验证您的凭据
我显然在 ASP 服务器端表单帖子上很流畅,所以任何建议都将不胜感激。谢谢。
Dim consumerKey,consumerSecret,myCstr
consumerKey = "abc..."
consumerSecret = "123..."
myCstr = base64_encode(consumerKey & ":" & consumerSecret)
myAuth = "Basic "&myCstr
Dim xmlhttp
Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST","https://api.twitter.com/oauth2/token",false
xmlhttp.setRequestHeader "User-Agent","HTTP/1.1"
xmlhttp.setRequestHeader "Authorization", myAuth
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"
xmlhttp.send "grant_type=client_credentials"