views:

105

answers:

3

I'd like to use Urban Airship to send push notifications to a user's iPhone when a new Twitter Search result is found.

I'm pretty positive I'd need a web app built to accomplish this - to register the user's iPhone, save their search terms and poll Twitter Search. How could I go about building this app (in terms of which language to use, etc.)?

Thanks so much.

+1  A: 

You are right, you need to build a web app which automatically searches Twitter and then creates a push notification payload to deliver to your users. In addition, you may want your app to also accept requests from users to retrieve the actual tweets. This is because you can't just load up the tweet content into a notification payload, as their is a rather small size limit.

Since Urban Airship works via HTTP, you can use whatever the heck language you want. Just go with what you know, there is no preferred way to do it.

I will say this though - there are lots and lots of tweets added every second. Scalability is probably going to play a pretty big factor in whatever you are trying to do. Which is probably why a year later there aren't very many Twitter apps that support Push.

bpapa
A: 

@bpapa is right and you should use the language you know best. Also, I would recommend looking into Twitter Streaming API, it will help you make your application actually realtime.

arikfr
+1  A: 

Hi there,

Everything said previously is correct, I just wanted to add one thing:

I strongly recommend looking into http://superfeedr.com to handle getting te data.

With Superfeedr, you can take advantage of their PubSubHubbub API and not have to do any of the RSS parsing yourself.

Here's how the flow would work:

  1. User subscribes to a Twitter user/search on the phone.
  2. Phone tells your service that User X has subscribed.
  3. Your web app registers with superfeedr to watch that RSS feed (and you keep track of this relationship)
  4. When a new item appears, Superfeedr POSTs to your web app with the latest items.
  5. You look up the relationship between user and feed and tell Urban Airship to send an alert to that user.

This way, all your webapp has to do is intelligently keep track of relationships.

Michael Richardson