Posted By

emregulcan on 04/27/10


Tagged

ASP status api twitter OAuth


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

nb109
britevents


Set your Twitter status via API (without oAuth)


 / Published in: ASP
 

This script works good condition, and not use "oAuth". Your should get username and password with cleartext (standart html controls) without authentication and just add them into variables in your code... (twitterusername and twitterpassword) And also get status from textbox and set variable named "new_status"

  1. Response.Buffer = True
  2. Dim xml
  3. Set xml = Server.CreateObject("Microsoft.XMLHTTP")
  4.  
  5. twitter_username = "YOUR USERNAME" 'change to your twitter username
  6. twitter_password = "YOUR PASSWORD" 'change to your twitter password
  7.  
  8. new_status = "YOUR STATUS" 'change to your new status
  9.  
  10. xml.Open "POST", "http://" & twitter_username & ":" & twitter_password & "@twitter.com/statuses/update.xml?status=" & server.URLencode(new_status), False
  11. xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
  12. xml.Send
  13.  
  14. Response.Write xml.responseText 'view Twitter's response
  15.  
  16. Set xml = Nothing

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: emregulcan on December 7, 2010

Probably it's not working no longer. Because Twitter completly close their "basic auth".

You need to login to post a comment.