Alert Hub Subscription: callback url for iOS app

98 views
Skip to first unread message

eman...@princeton.edu

unread,
Nov 18, 2014, 2:54:02 AM11/18/14
to google-cap...@googlegroups.com
Hello,

I'm attempting to incorporate Alert Hub into an iOS application and was having issues determining how to create a callback url in order to subscribe to Google's Alert Hub. From my understanding this url is necessary in order for my application to receive these alert updates. I have searched the internet but cannot seem to find any accurate information for this scenario. Thank you for your time! Any information or resources are greatly appreciated.

Best,
Emanuel

Pat Tressel

unread,
Nov 18, 2014, 4:08:02 AM11/18/14
to google-cap...@googlegroups.com
Hi, Emanuel!


I'm attempting to incorporate Alert Hub into an iOS application and was having issues determining how to create a callback url in order to subscribe to Google's Alert Hub. From my understanding this url is necessary in order for my application to receive these alert updates. I have searched the internet but cannot seem to find any accurate information for this scenario. Thank you for your time! Any information or resources are greatly appreciated.

You've likely seen this, but just in case...

AlertHub uses the pubsubhubbub protocol.  The documentation is here:

https://code.google.com/p/pubsubhubbub/w/list
https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.4.html

There are some subscriber client libraries here that could serve as examples:

https://code.google.com/p/pubsubhubbub/wiki/SubscriberClients

There is a test server here -- you can publish to it, and then subscribe to your own feed, so you can test your subscriber.

http://pubsubhubbub.appspot.com/
https://pubsubhubbub.appspot.com/subscribe

There isn't a fixed format for the subscriber callback URL itself.  The main requirement is that the URL has to be on a publicly accessible site, so you'd likely need to have a web site that gets the alerts and then contacts your mobile users.  If all your users will be getting the same feed of alerts, then you could have one callback URL.  But if each user can subscribe to a different alert topic, then the subscriber URL would be different for each, so you could tell who the recipient is.  The documentation suggests that you can have a query included in the URL, like https://my.web.site.com/subscription?user=abcde or however your web server identifies users.  The example clients (or at least the ones that are in the frameworks section in the list of clients) may have their own URL formats.

The harder part may be pushing the alerts out to your app's users.  (A project I work on lets users have contact methods, like email, SMS, Twitter, etc.  So when an alert goes out to users, we'll send it by whatever contact method the user has chosen for alerts.)

-- Pat
Reply all
Reply to author
Forward
0 new messages