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/

8/5/10

The value of education

I've grown increasingly jaded about the cost of higher education in this country vs. the economic value. As I start to blog and post, I'm collecting articles and responses under the tag "education ROI"


Original Article:
http://blogs.hbr.org/schrage/2010/07/higher-education-is-highly-ove.html


#
Bill_Patton [Moderator] 5 days ago
Fantastic article. I have for some time been comparing the "higher education bubble" with the housing bubble. Both were fueled by similar expectations for continuous growth and aggressive lending policies. As going to college came to be viewed a an inalienable right, lenders (with governmental blessings) stepped in to offer loans to all, with no regards or consideration for the underlying value of the degree being sought. Increased demand combined with cheap money led to spiraling college costs.

At some point, buying a $500,000 condo in California is as nonsensical as graduating $160,000 in debt for a liberal arts degree. In working with a few clients in the college lending space, I'm seeing a real backlash on the part of parents who no longer are willing (or even able) to underwrite $20,$30 or $40k/year tuition bills. Instead they are pushing quality community college classes for their children. I truly believe that many of our ivy crusted institutions are heading for a housing bubble type crash if they continue to decouple their tuition costs with the actual value of their degree.

#

Bjpower2 [Moderator] 19 hours ago in reply to Bill_Patton
Well said. I am in full agreement. For those who have real world skills, watching their portfolios for the "bubble-burst" of student debt and likely taxpayer bailout would be wise.
On the whole, the overall topic is almost too enormous for blog discussions. There is real value to gaining the ability for critical thought and systems thinking. With a good curriculum, a student learns to generalize the skills they learn from writing to applied statistics. While I have profound doubts about our current global higher educational institutions, a good programme will elevate a student's skills and abilities. The ROI on this is now in doubt -- for good reasons stated above. This is unlikely to be fixed by a myopic view on higher ed. It starts long before university.

7/28/10

cross domain tracking GA

been having trouble with cross domain tracking issues - turns out that the documentation on the google site was wrong... classic. This was the response from the big G:



Hello Bill,

Thank you for your email. We greatly appreciate any feedback or suggestions for ways we can improve Google Analytics.

Please note that I have informed the concerned team about the error in the documentation. As you mentioned, the article is incorrect:

<a href="https://www.secondsite.com/?login=parameters"
onclick="_gaq.push(['_link', 'http://www.firstsite.com']); return false;">Login Now</a>

It should be:

<a href="https://www.secondsite.com/?login=parameters"
onclick="_gaq.push(['_link',
'https://www.secondsite.com/?login=parameters']); return false;">Login Now</a>

Thanks for bringing this to our attention. Please note that this documentation will soon be edited.

If you have additional questions, please visit our Help Center at http://adwords.google.com/support/aw/, where you'll find answers to many frequently asked questions. We look forward to providing you with the most effective advertising available.

Sincerely,

Saranya
The Google AdWords Team