9/10/10

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:

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.

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 127.0.0.1

4. comment out the if statement that seeks to assign window focus to 127.0.0.1 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.