With our new announcement of support for Twitter in Tropo.com apps, I thought I’d walk through the steps of adding Twitter support to an app.
I’ve got a basic “Yahoo weather” app that I copied from the Tropo tutorials and sample apps. You can call it today at “(407) 374-3994″, send it SMS at the same number, (407) 374-3994, or use Jabber IM to contact it at “email@example.com”. You give it a US ZIP code (try “32801″ for Orlando) and it gives you a summary of weather.
Now I want to add Twitter support.
STEP 1: Login to your Twitter Account (either a new or existing one).
Obviously you first need a Twitter account to link to your app. You can use an existing Twitter account or, like I did, create a new one: @danweathertest. The next steps work best if you login to this account on Twitter.com before proceeding.
STEP 2: Start the Twitter activation process in Tropo.com.
Next you login to Tropo.com, click on the “Account” link and open up the application you want to link to Twitter (or create a new app – try one of the samples if you don’t have an app yet). At the bottom of the application info, you’ll see the tabs for the different channels you can use – click the Twitter “t” icon:
Just click the link to “activate Twitter”:
STEP 3: Allow the Tropo app access to your Twitter account.
You will now be taken to Twitter.com to complete the OAuth authentication process. If you did login to your (new or existing) Twitter account back in Step 1, all you need to do is click the “Allow” button. If you didn’t, or are logged into the wrong Twitter account, you’ll need to sign out of Twitter and login with the correct account.
After you click “Allow”, you will be redirected back to Tropo.com where you will see the message after a moment that Twitter has been successfully activated:
STEP 4: CELEBRATE!
That’s it! You’re done!
Welllll… you might want to test your app a bit to make sure that it works well with Twitter. For instance, when I send a tweet to my Yahoo weather bot:
I get back a flow of multiple messages:
Now maybe that is what you want… maybe it’s not. I think ideally it would summarize that report into a single tweet… but that’s an application implementation detail that I just have to go back and work on in the python code for my app.
In just a few steps I’ve added Twitter support to an existing Tropo.com app so that this one single Tropo application can be reached by any of these channels:
Voice:+1 (407) 374-3994
Skype: +99000936 9991438833
SMS: (407) 374-3994
Jabber IM: firstname.lastname@example.org
Now I could go on and add a MSN account, AOL account, etc., but for the purposes of this example I’ll leave it at that.
That’s all there is to it… take out a Twitter account, do the OAuth dance, and there you are! I look forward to seeing what kind of Twitter-related apps you all create!
- Scaling Your Twitter Support, Part 1: Adding a “Night Service” via Tropo.com
- Scaling Your Twitter Support, Part 2: Triggering Alerts on Keywords
- Scaling Your Twitter Support, Part 1a: Tweaking the “Night Service” app a wee bit
- Testing a Tropo app with Twitter? Remember that Twitter rejects duplicate tweets…
- Want to play with building Twitter apps on Tropo? Here’s source code for 5 sample apps.