Using oAuth Twitter protocol with VBScript Classic ASP

Update: My twitter feed stopped working when the API was modified October 10, 2012. Luckily changing the code was straight forward and required simply updating the destination for the various post/get statements with the new HTTPS urls as so:

' TWITTER CONSTANTS (add to suite)
'' Const TWITTER_OAUTH_URL_ACCESS = "http://twitter.com/oauth/access_token"
 Const TWITTER_OAUTH_URL_ACCESS = "https://api.twitter.com/oauth/access_token"

'' Const TWITTER_OAUTH_URL_AUTHENTICATE = "http://twitter.com/oauth/authenticate"
 Const TWITTER_OAUTH_URL_AUTHENTICATE = "https://api.twitter.com/oauth/authenticate"

'' Const TWITTER_OAUTH_URL_REQUEST_TOKEN = "http://twitter.com/oauth/request_token"
 Const TWITTER_OAUTH_URL_REQUEST_TOKEN = "https://api.twitter.com/oauth/request_token"

'' Const TWITTER_OAUTH_URL_UPDATE_STATUS = "http://twitter.com/statuses/update.json"
 Const TWITTER_OAUTH_URL_UPDATE_STATUS = "https://api.twitter.com/1.1/statuses/update.json" '--updated 10/18/2012

The recent move from REST to oAuth protocol for the twitter API left some developers (like me) scratching our heads. Most of the sample code was written either for PHP or .NET folks - leaving those poor bastards who are still writing VBScript out in the cold.

Luckily for us - Scott at http://scottdesapio.com/VBScriptOAuth/ has put together a great resource for migration to the new platform.

Start with the link above then note that you must:
1. update the _config file with vars supplied by twitter dev site AFTER you register your app. Note that at the time of registration you must provide your call back url (which in the example from scott would be something like http://www.logsitall.com/oAuthASPExample/twitter/callback.asp)

2. update line 40 of base.js file

3. update base.js to refer to your domain, not

4. comment out the if statement that seeks to assign window focus to at the end of the base.js file

When you are done, you'll have a system that requests the token from twitter and then uses this token in conjunction with the token's associated with your app to make posts to twitter status feeds.
From a dB standpoint - i think you only need to store the user token - then pair this with the app tokens (which are persistent) in order to make twitter updates on behalf of your users.

Good luck and happy coding.

LogsItAll example:



  1. This does not work now because of the new Twitter API.

    My ASPTwitter demo shows how to do it with API 1.1.

  2. Ordinarily individuals who you take after yourself will tail you. That is the manner by which you at first develop your Twitter base. buy twitter followers uk

  3. Twitter is the current top "hot property" on the Web, but its popularity and how to use it has mystified many business owners.article

  4. "I'm thinking about using Darren Winters from Win Investing. Any good? This is the guy... https://twitter.com/darrenwinters01. Thanks for the great blog!"

  5. All supported endorsers must not make any deceptive or misleading promotions or claims about your items. social media groups

  6. Good composed article. It will be steady to any individual who uses it, including me. Continue doing what you are doing – can'r hold up to peruse more posts. Buy Targeted Twitter Retweets

  7. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. Buy Twitter Likes

  8. You should definitely take a spring tour in the northern Albania. The blue eye in Theth is fascinating and more fascinating is the road to go there. The view in every mountain top is spectacular. To top it all of the people are so friendly that will make you feel more like a guest than a traveler Albania History

  9. Use LinkedIn to present individuals you think would be a decent match.influmos

  10. You made an article that is interesting.You are so amazing.
    Thanks a million and please keep up the effective work. clipping photoshop

  11. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... smm panel

  12. Thanks for sharing excellent informations. Your web-site is very cool. I'm impressed by the details that you have on this web site. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for extra articles. You, my pal, ROCK! I found simply the information I already searched all over the place and simply couldn't come across. What a perfect web-site. Insta khabr231

  13. We expect PR organizations to not just commit a spending plan for their social media endeavors later on, yet in addition recruit social media experts to deal with their customer's social media exercises.smm panel India