ASPTwitter for legacy classic ASP websites: updated to Twitter API 1.1
Introducing ASPTwitter -- the simplest possible way to implement Twitter within a classic ASP website.
You can download the ASPTwitter source code from my SkyDrive along with a working demo which authenticates and get tweets using the Twitter API 1.1 and the Application-Only authentication model which does not require user interaction.
This classic ASP code library supports Twitter API 1.1 and OAuth. It's easy to extend, and if you do add any new methods send me the updated ASPTwitter.asp file and I'll update the ZIP file on SkyDrive accordingly. I'll add this to source control, probably Git or Codeplex, if I have a chance. main Every code block can easily be ported to other scripts e.g. PHP, Ruby, Python, etc, with minor tweaks.
I've noticed a huge number of people seeking a classic ASP client for Twitter that still works today. I recently updated my own library, ASPTwitter , to support Twitter API 1.1, so I want to sharing my updated code so people don't have to "reinvent the wheel". ASPTwitter boils down to a single class providing simple and convenient methods for authenticating and using the Twitter API. It's designed to be the simplest possible wrapper around the HTTP response/request calls involved, via the standard built-in XmlHttpRequest component. My working sample code is self-explanatory and also includes some other useful libraries, including code for JSON serialisation/deserialisation for VBScript/JScript.
Last week, as scheduled, Twitter shut down version 1.0 of their API. Thus, anything that uses the Twitter API now needs to use Twitter API version 1.1, which involves some important changes. Many legacy applications therefore broke last week and will need updating. This is obviously a widespread issue; indeed, Twitter's dev website currently displays a notice at the top of the page saying: "June 11, 2013 Having trouble with your app? API v1 is retired and no longer functional. | Read more".
Millions of websites still use classic ASP. It's a stable, well established and convenient legacy technology. In an ideal world you'd convert all of your legacy web apps to ASP.NET MVC, but in the meantime ASPTwitter will fix the problem. I still see new comments online by devs who are implementing new features in their legacy classic ASP web applications and are seeking help with the Twitter API. Devs may also wish to consider Embedded Tweets as a client-side solution for putting Twitter content on your website.
Classic ASP loves JSON
Microsoft invented Ajax -- credit where it's due to IE6
Today, Ajax is a fundamental part of the web, and JSON has become a more popular data format than XML for Ajax. Microsoft created Ajax, long before it caught on. The earliest Ajax methodology used the HTML 4 IFrame element first released with IE3+ in 1996 and IE4 in 1997. (Iframe also paved the way for COMET and for several years was the only COMET methodology available to developers.) In 1998/9 Microsoft released the first versions of their XMLHTTP component, first available in IE4 and IE5. When IE6 was released, XMLHTTP was already well established and Ajax was catching on like wildfire. Client-side specifications have evolved, and thankfully standardised accross platforms to a greater extent, yet there are still serious cross-browser problems and true harmonisation seems an unlikely utopia.
16 June 2013