The webOS foursquare app has come a long way since its first release and now more than ever its become a very robust piece of software and has been considered the best foursquare client by many foursquare users.

But I think it could be more. And that’s where you Twitter app developers come in.

You may or may not know that the foursquare service ties pretty tightly into Twitter. One such way is that on each user’s profile, in addition to an email address and phone number, you can see a link to their Facebook and Twitter accounts (if the user provides them). As of right now, tapping the link to a user’s Twitter profile opens up the mobile Twitter site in the web browser. While the mobile Twitter site is pretty nice, most webOS users don’t use it since there are plenty excellent native Twitter apps.

What I’d like is to allow users to select their favorite Twitter client from a list in the foursquare app’s preferences so that when they tap to go to a user’s Twitter profile, it opens the Twitter app directly to the user’s profile.

SO! What I’m asking is for the developers of Twitter apps to develop a basic API for their apps that their AppAssistant’s handleLaunch function will, well, handle. I propose being able to pass {action: “user”, name: “zhephree”} when launching your app and it’ll load that user’s profile.

This will help promote your app and make your users use it more exclusively instead of sometimes using the mobile website (or worse, a different Twitter app they have installed!) Plus, other apps besides foursquare would be able to do this, making your app more visible to other users. I know if I had two favorite Twitter apps but only one of them could be opened by some other favorite app, I’d use that one more.

I’ve already implemented something like this in the foursquare app. As of the upcoming foursquare v1.2, passing {action: “venue”, id: “416655”} will open the foursquare app directly to the venue scene displaying information about the service station my dad and uncle own.

But here’s where you Twitter app devs can help me.

In case you don’t know, when a user checks-in to a venue on foursquare, they can opt to post it to Twitter. It’s displayed like “I’m at Mick’s Irish Pub (4801 Bienville Ave., New Orleans, LA) http://4sq.com/1rNJ8N”.

That link at the end of the tweet goes to the foursquare venue page on the full, desktop foursquare website which is pretty unusable on a mobile phone. But here’s the beauty behind that URL: it’s a bit.ly URL so it can be expanded with the standard bit.ly API. So, here’s what I’m asking: pass all your 4sq.com links through the foursquare app like this:

{action: “url”, url: “http://4sq.com/1rNJ8N”}

My app will then ask bit.ly for the full URL, extract the venue’s ID # from the URL (which looks like http://foursquare.com/venue/16325), and then display the venue detail scene in the foursquare app, which will then allow users to see more info about the venue, call it, post photos to it, or even check-in.

Now, sometimes the @foursquare account will tweet out articles in the press about themselves and shorten them with 4sq.com URLs. The foursquare app will look at the expanded URL and if it is not a foursquare venue URL, it silently passes the URL on to the native web browser and your user has no idea that when they clicked that link, it actually opened in foursquare before the web browser.

So, what if the user doesn’t have foursquare installed? Well, here’s some code to show how to launch foursquare and fail gracefully. Note: I adapted code from James Harris who uses this code in his Free Music Ringtones app to send ringtones into other apps (which foursquare 1.2 now supports also!).

   try{
      this.controller.serviceRequest("palm://com.palm.applicationManager", {
         method: 'launch',
         parameters: {
            id: 'com.foursquare.foursquare',
            params: {action: 'url', url: VARIABLE_CONTAINING_THE_4SQ.COM_URL}
         },
         onSuccess:function(){
            /*
              INSERT ANY CODE YOU WANT EXECUTED UPON SUCCESS OF LAUNCHING FOURSQUARE
            */
         }.bind(this),
         onFailure:function(){
            this.controller.serviceRequest('palm://com.palm.applicationManager', {
                method:'open',
                   parameters:{
                   target: VARIABLE_CONTAINING_THE_4SQ.COM_URL
                        }
             });
         }.bind(this)
      })
   }catch(e){
      /*
       INSERT ANY ERROR HANDLING CODE HERE
     */
   }

It’s fairly straightforward. Basically, it asks the application manager service to launch foursquare with the URL passed to it. If it fails to launch (either because it’s not installed or some other error), onFailure would then open the URL in the standard web browser.

Another option would be to, by default, open ALL links in the standard browser and offer a preference item that lets the user select “Open 4sq.com Links in Foursquare?” and then you only have to handle whether your preference is true or false as opposed to catching a failed app launch.

So, that’s my proposition. If you Twitter app developers decide to implement letting other apps open yours up directly to a user’s profile, PLEASE either comment here or e-mail me (geoff@zhephree.com) and we’ll talk. I’ll need your app’s ID and a 32x32 icon. Also, let me know if you’re interested in opening 4sq.com links in foursquare. I think your users that also use foursquare will greatly appreciate it as it’ll enhance their experience.

I think this is a great way for apps to start sort of cross-promoting each other and greatly enhances the “synergy” idea that’s present throughout webOS.

Update:
BadKitty is on board! Foursquare 1.2 will let you open twitter users in BadKitty! Who’s up next?

Update 2:
TweetMe is also on board! Foursquare 1.2 will let you open twitter users in TweetMe!

  1. zhephree posted this
blog comments powered by Disqus