View Single Post
  #2 (permalink)  
Old October 14th, 2009, 11:22 AM
aspless aspless is offline
Friend of Wrox
Points: 489, Level: 7
Points: 489, Level: 7 Points: 489, Level: 7 Points: 489, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Berkshire, United Kingdom.
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

Direct Message:

Code:
 
<%
'============================================================== 
' 
' SITEJUNCTION 
' TWITTER STATUS UPDATE 
' 
' With this script you can send direct messages
' 
' July 2009 - Erick Hiemstra and a bit of Aspless
' 
' more info: 
' http://sitejunction.awardspace.com/vbscript_tweets/basic_script/ 
' 
'============================================================== 
OPTION EXPLICIT 'Be sure you have declared all your variables. 
' -------------------------- 
' SOME VARIABLES 
' In this script the response is hardcoded directly into a variable 
' to keep the script readable, but could of 
' course come from whatever source. 
' -------------------------- 
Dim strUsername, strPassword, strMessage, strRecipient 
strUsername = "your name here" ' Your Twitter username 
strPassword = "your password here" ' Your Twitter password 
strMessage = "Message Here." ' Direct Message
strRecipient = "Recipient Here" ' Recipient
 
' Calling the function and store the result in a variable. 
Dim strTwitterXMLResponse 
strTwitterXMLResponse = SendToTwitter(strMessage, strUsername, strPassword) 
' Post back the result with a messagebox so you know something happend 
MsgBox strTwitterXMLResponse, VbOkOnly, "TWITTER STATUS UPDATE" 
' -------------------------- 
' FUNCTIONS 
' This is where the actual work is done 
' -------------------------- 
Function SendToTwitter(strMessage, strUsername, strPassword) 
 
' This is the function wicht does all the work. 
' It uses XMLHTTP to post your message to Twitter.. 
Dim objHTTP 
Set objHTTP = CreateObject("Microsoft.XMLHTTP")


.. p2p guys this script keeps geting cut when pasting

Last edited by aspless; October 14th, 2009 at 11:28 AM.
Reply With Quote