Twitter xAuth with .NET

Twitter is shooting for a mid-2010 shutdown of Basic Auth for its API.  That means that all the little scripts that we threw together over the years, just for fun, will no longer work.  It also means that you will no longer be able to test an API call by simply pulling up your browser.  Honestly, I’ll miss Basic Auth.  I think the easy approach encouraged a lot of innovation, but it’s time to move on.  Some folks have been dragging their feet, understandably, because there wasn’t a good oAuth solution for the desktop.  With the release of the xAuth standard, however, there aren’t going to be any more excuses.

xAuth is a compromise.  The user must provide a Twitter username and password to the desktop application.  The desktop app will then contact Twitter and exchange the username and password for an oAuth token.  All subsequent calls to the API should use the oAuth token, and the app must never store the user’s username and password. 

You might be saying to yourself, “But a bad app can still grab the username and password” — and you’d be absolutely right, but that type of discussion is beyond this post, I just want to show you how to use xAuth.

 

Download the code here

 

xauth

I modified the code from my previous PIN-based desktop application example. Make sure you keep track of the token and secret that Twitter returns and save that in a datastore.  A user should only need to provide their username and password in two scenarios, when they first begin using your app, or if they later revoke access for your app.

The xAuth access_token method is described here:  http://apiwiki.twitter.com/Twitter-REST-API-Method:-oauth-access_token-for-xAuth

Please note the following requirement: “In order to get access to this method, you must apply by sending an email to api@twitter.com.

Twitter is serious about ensuring that this method is only used for desktop apps.  They will reject your application if it looks like it could possibly use standard oAuth.

Good luck with your conversions.  Feel free to leave any xAuth issues you run into in the comments section.

Technorati Tags: ,,,,

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

The Startup Visa – Why do we need this?

If I ever had dreams of raising funds through a VC, maybe I’ll be able to kiss those dreams goodbye after this post.  After all, over 100 venture capitalists are backing the new “Startup Visa.”  I just finished reading the very skimpy text of the bill (pdf), introduced by John Kerry and Richard Luger this week, and I can’t see how this will have a substantial impact on America’s ailing economy.

CENTURY MIRACLE ON ICE

The bill would make it possible for a qualified VC to bring in any number of entrepreneurs at the paltry sum of $250,000 for a period of two years.  The entrepreneur is required to create at least five new jobs, and there’s an additional requirement for $1,000,000 in revenue and $1,000,000 in funding (at some point).  The Secretary of Homeland Security is given the job to oversee this program and send people home after three years if the requirements aren’t met.  (I’m not sure why this falls under Homeland Security.  Don’t they have more important things to worry about?) 

“Wait?  New Jobs?  That sounds great!”  At least that seems to be the reaction of many people when they first hear about the bill.  I’ll give the bill some credit in that it eliminates wives and children from being counted toward the five new jobs.  It doesn’t mention cousins, uncles, or parents, but I don’t think that’s really the main concern.  The big concern for me is that it doesn’t mention any restrictions on existing visa holders.  This means that these new startups could become a haven for H1-B workers who may have lost their jobs (like so many other people) and would otherwise be forced to go home.  Instead of creating jobs for out-of-work Americans, more foreign workers might have the ability to stay in America and continue to compete against American citizens for the now-smaller job pool.

Another thing I don’t like about this bill is the message that it sends to American entrepreneurs:  “We’re all out of hard-working, creative people in America.  We need people from other countries to jump-start this economy.”  If the venture capitalists are ready to fund startups, why can’t these funds go to Americans so that we can build companies and create our own jobs?

I also think that we’re missing a huge opportunity to fund these entrepreneurs in their own countries.  If we’re truly committed to a global economy, then it’s not helpful to drain resources away from other countries.  They need to foster entrepreneurship locally and provide jobs to their own people.

Why should the American people support this bill?  It seems to be saying one of two things: either there aren’t any good Americans out there to fund, or we just want the cheap labor.  Either way, I don’t think this is going to help America, and I don’t support this bill.

————————-

I can probably anticipate at least a couple of reactions to a post like this:

You’re being an elitist. – That’s probably true, but isn’t that how teams work?  I’m a member of Team USA. [insert sports metaphor here]

The market should decide who gets funding, not immigration law. – If we’ve learned anything from our recent banking debacle, we should know that the market is imperfect at best.  If we rely solely on the market to determine the outcome, why have any immigration restrictions at all?

But this will create jobs for Americans! – Again, why not create them through American entrepreneurs?

You’re just a right-wing wingnut. – I strongly believe in the Spirit of the American people.  If that makes me a nut, so be it.

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

Twitter oAuth with .NET for the Desktop

I hope people have benefitted from my example application for Twitter oAuth in .NET.  Occasionally someone will leave my Twitter name in the sample post and it pops up in my Tweetdeck.  I don’t mind – it’s nice to know that the code is useful. 

The original code that I provided was aimed at web applications.  I haven’t had the need to develop any desktop apps lately and so I didn’t create any code for that style of oAuth.  Quite frankly, I still find the desktop oAuth (using the PIN) to be a little awkward and I look forward to the promotion of xAuth by the Twitter team.  However, someone asked me to create a sample desktop app using oAuth.  I saw it as a challenge and decided to give it a try.

Download the code here

 

My first pass at the app popped up a web browser using ProcessInfo().  It worked, but I decided to go with the webcontrol to keep the user focused on the application.  This form represents a one-time login page.  After the login and PIN process, you can store the token and secret so that the user won’t need to login again (unless he or she revokes access for your application).

 

oauthdesktop1

 

oauthdesktop2

 

Once the user allows access to your application (screen shots above), a PIN will be displayed.  The user must then enter that PIN in the textbox near the bottom of the screen.  When the user clicks on the Update button, the PIN is used to retrieve the final credentials from Twitter.

When you add this to your project, you’ll need to include references to System.Web and System.Configuration.  Other than that, it’s a pretty standard desktop application.

As I mentioned, I’m looking forward to Twitter’s general release of xAuth.  That’s the type of authentication used by Seesmic Look.  It’s a much smoother process for the user.  Until then, I hope this code will help with your Twitter desktop applications.

p.s. – Of course I saw this post after I created my app (why does it always happen that way?). – GameTree – http://gametree.org/?p=245

 

Technorati Tags: ,,,

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

2010 Top 10 List of People to Unfollow on Twitter

It’s been a little over a year since the first, “Top 10 List of People to Unfollow on Twitter,” and the responses to that post still amaze me.  As I expected, the comments contain a number of creative and very funny additions to the original list. 

I always knew I’d write a follow up post to include many of those comments, and I finally sat down to bring them together.  The 2010 list includes old standards that could have been part of the original post.  It also has a few new types that probably emerged over the past year as Twitter’s growth exploded and the platform matured.

Once again, your additions are welcome in the comments section.

1) School Marm – The school marm is a frustrated linguist. He can’t stand to see the Queen’s English butchered in any shape or form, even during a casual conversation on Twitter.  She’ll often throw out copious rules and tips: “i before e,” “its versus it’s,” and “the proper usage of a semi-colon.”

GentlemanWriter: @CaveGirl You might want to check your iPhone, the autocorrect appears to be changing “you’re” to “your” again.

GentlemanWriter: @CaveGirl Did you mean to call me that? Now that’s not very nice. Did someone’s dictionary desert them today?

 

2) Social Cause Bully – Twitter is an open forum and all participants are welcome to share perspectives and ideas. You will never be attacked or coerced, and bullying tactics are never tolerated…unless it’s for a good cause.

StayTru: I haven’t seen one tweet today about what’s going on with Brazil’s Pygmy Elephants (BPE)!!! Not one.

StayTru: @OrlandoBoo Glad your son’s birthday is going well. Wouldn’t it be great to donate in his name to BPE?  They’ll never see THEIR 10th b-day.

StayTru: Come on people. Give to BPE now! Stop texting about last night’s reality show and MAKE A DIFFERENCE.

 

3) The Affiliate – You’re not sure when this account was taken over by spammers, but you know darn well these weren’t the tweets you signed up for. Still, you think maybe he’s just lost his way for a bit and things will go back to normal soon. Plus, you’re just too lazy to hit the unfollow button.

NewsHabit: A mom in Denver developed a teeth whitening system, and all of your dentists are plotting to kill her! http://whiteteethofdeath.com?id=338458317

NewsHabit: I lost 40 lbs. on the “Cookies and Clean” whole-fiber cookie diet — and you can too! http://CookiesAndClean.com?id=3838318373

 

4) Care Bear – The Care Bear provides an endless stream of positive quotes, words of wisdom, and loving affirmations. How she became so enlightened at age 23, you’re not sure, but you figure you’ll continue to follow her, just to see if she eventually has a meltdown.

SoulSurvivor: May your day be full of rainbows and your heart filled with sweet song.

SoulSurvivor: Inspire someone today. The Love you share will ripple across Space and Time to touch the Souls of Angels.

 

5) The Griper – “FAIL!” shouts The Griper at the smallest mistake. The World is full of idiots and The Griper knows each and every one.

ParteeGirl: I ordered a Margarita with “no” salt. It came covered with HUGE grains. FAIL!

LawGrad: My cell phone service goes out every time the train goes through a tunnel. FAIL!

GenYer: FAIL! I forgot what I was complaining about. SELF-FAIL!

 

6) Numero Uno – Have you ever followed someone and felt like you might just be another number to them?  With Numero Uno, you can stop wondering.  Yes, you’re one of many to him, but at least he will count you on a daily basis.  Numero Uno values the size of his friend-list above all else and is constantly talking up his stats.

ViaAFriend: Thanks for helping me push past 10,000 followers. Each one of you means so much to me. Only 25 more to reach 10,025. Let’s do it before Fri!

Numero Uno cannot resist any online application that returns some sort of number. The numbers don’t even need to make sense, but he’ll happily tweet out the stats for all of his followers to see.

SalesGuru23: @SalesGuru23 just favorited his 1,000th tweet! See how many favorite tweets you have – http://topfavorites.com

 

7) Twitter Expert – There are 15,740 Social Media Experts on Twitter [Mashable 12/27/2009], and I’m sure they’re all Twitter experts as well. The Twitter Expert knows how things should be done on Twitter and will never hesitate to provide finely-honed nuggets of genius to those who are new to the Twitter scene.

Marketeur: Remember, it’s important to complete your bio on Twitter. Fill in the url to your website and change your avatar by uploading a picture.

BobNewbee: Thank you, @Marketeur! You ARE the best!

 

8 ) Roadwarrior – Think about the last time you were in an airport. Do you really want to be reminded of the hassle, the boredom, and the discomfort? Well, the Roadwarrior thinks you do, and she’ll share every last detail of her latest travel experience. It’s just like being there!

Acct2Go: Sitting in a broken airport chair. Lousy wifi keeps cutting out and my battery is at 5%. Delayed for another hour. Ughh!

Acct2Go: Boarding the plane now. Up the ramp. Through the door.

Acct2Go: Unloading my luggage. What a joy.

 

9) Chatterbox – Here’s everyone’s favorite, The Chatterbox. She uses Twitter as her own private chatline. Come back from lunch and you might just see several pages of her replies to multiple friends covering at least ten conversations. Many of her tweets contain one or two words. Witty responses such as “LOL” and “As if” flood your tweet stream. Sometimes you wouldn’t mind following some of her friends (What is she LOLing about?). Then you quickly realize that it would take all afternoon to trace each thread.

PlayTime: @Tutu I like that!

PlayTime: @CaliGurl LOL

PlayTime: @Sumthin @Keuliu @Jibjab Haha. Smooches to you too.

PlayTime: @Dankat I was just thinking that! TTYL

 

10) Fanamaniac – Most people are fans of someone. Whether you admire a major entertainment celebrity or you simply look up to someone who attends all the cool social media parties, it seems that no one can escape this type. Fanamaniacs may hide their condition under normal circumstances, but they always expose themselves on Twitter. Probably some of the saddest moments though, take place when a Fanamaniac holds a one-way conversation with a famous celebrity.

GGGirl: @Oprah The same thing happened to me. Lord, give us strength. LOL

GGGirl: I totally agree @Oprah. You go on. Have a great show today!

Many Fanmaniacs post normal tweets on a regular basis and you’d never know they’re a secret fan. Then, they slip in a retweet of their idol, and all is revealed.

LumberJack33: RT @alyssamilano: I’m giving to the Brazilian Pygmy Elephant Fund. Won’t you help?

Some of the most disturbing Fanmaniacs are the staid, even-toned professionals who simply lose it when one of their personal idols joins Twitter.

PolyScientist: WOW! Henry Kissinger is now on Twitter! Welcome @MrKissinger!!!

 

So there you have the “2010 Top 10 List of People to Unfollow on Twitter.”  If Twitter’s still here next year, maybe I’ll make another list (who am I?).

 

Technorati Tags: ,,

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

Your Customer Service Sucks

Customer Service is as much an attitude as it is a function.  I’m not sure why employees who lack basic people skills are allowed to respond to customer service requests, but it happens much too frequently.  There are too many people in customer-facing jobs who can’t relate properly to their customers.  Businesses need to provider better training to these employees or move them to back-office jobs.  We shouldn’t reward businesses that continue to employ people in the wrong positions.

I always like to use my glorified version of the ‘50s as a baseline for customer service.  I picture the service stations of yesteryear as top providers of great customer care.  Do you have a smile on your face while washing those windows?  Do you always say, “Yes, sir!” and “Thank you, ma’am!”  Maybe the customer isn’t always right, but it’s important to listen to the customer and provide good feedback, even when they’re wrong.  It’s more than just good business, it’s good manners.

livechat

I just had a bad experience with one service that I actually liked.  Now, I’ll probably find a new provider.  Rather than just layout the bad exchange, I’m going to first model what I consider the appropriate responses.  Sure, my version of the appropriate responses sound a little stiff, but when it comes to good customer service, I’d rather go for “polite” than “casual” any day.

I was recently making a change to a website.  As part of that change, I had to update the settings on a third-party website.  I was having trouble making the change on their site, and it appeared to me that the service provider may have been having some server trouble.  I contacted the service provider via e-mail.

How I wish they’d responded:

Me:  Your service appears to be down.  I can’t ping the server at “xyz2.com.”  I can, however, ping your other server at “xyz1.com”

Proper Support:  Thank you for alerting us to this situation.  I will check into it and get back with you shortly.

Proper Support:  Hello, Sir.  I have verified that “xyz2.com” is up.  It is working properly.

Me:  Thank you for the response. I tried to ping “xyz2.com” and it did not reply. I assumed since your other servers reply to a ping (e.g. “xyz1.com”), that they would all reply to a ping. I guess you must have a firewall block on “xyz2.com” that is not on your other servers.

Proper Support:  I’m not sure, but I will follow up with our engineers on your question.  Would you like a response to that inquiry?

Me:  No, that’s okay.  As long as the services are up and running.

Proper Support:  Thank you, Sir.  Have a good day.

Me:  Thank you.  You too.

 

This is a Reader’s-Digest version of the actual exchange, a great example of bad customer service:

Me:  Your service appears to be down.  I can’t ping the server at “xyz2.com.”  I can, however, ping your server at “xyz1.com”

Support: That server is not down and it is serving the correct information:   {half-a-page of log entries to show the service is running}

Me:  Thank you for the response. I tried to ping “xyz2.com” and it did not reply. I assumed since your other servers reply to a ping (e.g. “xyz1.com”), that they would all reply to a ping. I guess you must have a firewall block on “xyz2.com” that is not on your other servers.

Support:  I am only concerned with if the servers are giving the correct information and if the site is online, both are working.

Me: I went back and reviewed the history of our support exchange. I didn’t see anything in my requests or replies that would indicate an unreasonable approach on my part. Your last reply seems very dismissive of my concerns.  Was there some sort of miscommunication?

Support: I have addressed your concerns proving the servers are working and the site is online.

 

So, clearly, as far as my original inquiry goes, I was wrong.  Their services were not down.  I misinterpreted what I knew about their other servers, which apparently didn’t apply to this particular server.  The support person responded precisely to my request.  I asked if the server was down and she proved to me that it was not – but is this how she should have done it?  This is Basic Human Behavior – never leave a person feeling like you didn’t take their request seriously.  I even gave her an out at the end to quickly apologize.  Things sometimes get garbled in written form; I know that, but she completely ignored the opportunity to apologize and leave things on a good note.

I’m now looking to replace the services of this company.  I rarely need their support and their services have otherwise been good, but you just can’t run a business with an attitude like this.  I don’t have to take it, and I won’t.

What do you think?  Is this just a minor gaff for an otherwise good service?  Do you ignore bad customer service if everything else is fine?

Props to Nordstrom

And just to leave this post on a good note, I’d like to praise Nordstrom for some of the best customer service that I’ve ever experienced.  I made a couple of calls to them over the holidays and they were perfect.  I didn’t wait long to talk with a live person, and the rep that helped me was polite, knowledgeable, and communicated well.  She even went well beyond what I expected during the call.  Great job, Nordstrom, I hope many others follow your lead.

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef