Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
HTTP POST Twitter Status UpdateDemonstrates how to send a status update to Twitter. (i.e. post a tweet)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set http = Server.CreateObject("Chilkat_9_5_0.Http") ' Any string unlocks the component for the 1st 30-days. success = http.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>" End If ' Set the login/password for Twitter Authentication: http.Login = "myLogin" http.Password = "myPassword" set req = Server.CreateObject("Chilkat_9_5_0.HttpRequest") req.AddParam "user","myUsername" req.AddParam "status","The text of my status update / tweet" ' response is a Chilkat_9_5_0.HttpResponse Set response = http.PostUrlEncoded("http://twitter.com/statuses/update.xml",req) If (response Is Nothing ) Then Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>" Else If (response.StatusCode = 200) Then Response.Write "<pre>" & Server.HTMLEncode( "Tweet Successful!") & "</pre>" Else Response.Write "<pre>" & Server.HTMLEncode( response.BodyStr) & "</pre>" End If End If %> </body> </html> |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.