我需要在Twitter上创建一个发布新闻的系统。我在网上发现了这样的代码。我创建了一个Twitter API,填充了ConsumerKey和ConsumerSecret。
我测试了它没有错误的代码,但没有放在Twitter上。任何人都可以帮我解决这个问题吗?
以下此代码就是出于这个原因?
<!--#include file="oauth/cLibOAuth.asp"-->
<%
Dim objOAuth : Set objOAuth = New cLibOAuth
objOAuth.ConsumerKey = twitter_consumer_key
objOAuth.ConsumerSecret = twitter_consumer_secret
objOAuth.EndPoint = "http://twitter.com/statuses/update.json"
objOAuth.Host = "api.twitter.com"
objOAuth.RequestMethod = "POST"
objOAuth.UserAgent = "Alert System Updater"
objOAuth.Parameters.Add "oauth_token", twitter_oauth_token
objOAuth.Parameters.Add "oauth_token_secret", twitter_oauth_secret
objOAuth.Parameters.Add "status", tstatus
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
%>