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:

'******************************************************************************
' 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 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.

Good luck and happy coding.

LogsItAll example:

http://www.logsitall.com/oAuthASPExample/

37 comments:

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

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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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!"

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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

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

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

    ReplyDelete
  11. 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

    ReplyDelete
  12. 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

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. LinkW88moinhat on Twitter potentially has a viral effect, and if you provide value and connect with the right people, your name, brand and presence can be spread across many different Twitter users.

    ReplyDelete
  15. Clients who are upbeat and fulfilled will get the message out and furnish you with the best and most reasonable promoting known to man, verbal.increase twitter followers

    ReplyDelete
  16. This was a really great contest and hopefully I can attend the next one. It was alot of fun and I really enjoyed myself.. complex

    ReplyDelete
  17. Thanks For sharing this Superb article.I use this Article to show my assignment in college.it is useful For me Great Work. kess nubian

    ReplyDelete
  18. Twigee for Twitter - Twigee is a perfect, quick, great and full capacity twitter customer (API upheld). https://www.droidmen.com/top-4-things-you-can-do-to-improve-your-social-media-marketing-strategy-in-2019/

    ReplyDelete
  19. In all cases, the foundation of the day were intensely evaluated. confira o aplicativo aqui

    ReplyDelete
  20. So yes, you can add a sales funnel to your existing website or you can actually turn a traditional website into a big sales phone. https://www.techfunnel.com/martech/twitter-tools/

    ReplyDelete
  21. So how would you get devotees? Indeed, I began by following each and every individual (who I found by doing a Twitter search) who had the last name McCord. leptitox real reviews

    ReplyDelete
  22. The individual with heaps of companions added got tremendous income for promoting item and administrations of any large business firm. smm panel

    ReplyDelete
  23. You ought to be the go-to individual when addressing brands in social spaces and persistently connect and draw in with your crowds.buy twitter followers

    ReplyDelete

  24. Another amazing resource of Twitter is that you can collaborate straightforwardly with your clients. https://sites.google.com/view/instagramfollowersbuy/

    ReplyDelete
  25. This will presumably be the most un-utilized of your more extensive abilities, however by and by it can help you in your social advertising positions. Get More Customers With Social Media

    ReplyDelete
  26. Seeing what social media means for website streamlining will eventually further develop crusade execution. In 2012, there was a normal of 5,134,000,000 quests on Google each day. In the event that you figure SEO doesn't make any difference to your social exercises, reconsider. smmpanel

    ReplyDelete
  27. By tapping on the 'My Channel' connect, YouTube takes you to another page where you can begin to make your own YouTube channel.https://www.buyyoutubeviewsindia.in/youtube-marketing/

    ReplyDelete
  28. Each work that burns-through speculation should be estimated and dissected. you can check here

    ReplyDelete
  29. Great thanks for sharing this article post. Really looking forward to read more. Awesome.
    upload reels to instagram from pc

    ReplyDelete
  30. Thanks for the blog article. Really looking forward to read more. Really Great.

    upload videos to instagram from pc

    ReplyDelete
  31. Young people are as yet the biggest number, however as you'll find in a portion of these measurements, YouTube is incredible for other age bunches too. Check out this: 85% of the United States populace has watched YouTube recordings. That is gigantic. 85% of the entire United States has watched a YouTube video. This is staggering! mélybölcsős fuvarozás Europa-Road Kft.

    ReplyDelete
  32. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article. Miami Superhero

    ReplyDelete
  33. Streaming is the method involved with playing a document while it is as yet downloading. Real time video is a grouping of "moving pictures" that are sent in packed structure such that it can begin being continue before it is totally gotten like video cuts on a Web page. https://onohosting.com/

    ReplyDelete
  34. Valuable open doors are being acquainted with business visionaries that they never longed for having readily available.mélybölcsős szállítás Europa-Road Kft.

    ReplyDelete
  35. I would like to say that this blog really convinced me to do it! Thanks, very good post. Mega888 twitter

    ReplyDelete
  36. Thank you ever so for you blog article. Thanks Again. Cool.
    upload reels to instagram from pc

    ReplyDelete