Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Wednesday, July 22, 2009

Adobe Wave: Creating dynamic notifications (Broadcast, not using the Publisher Portal)

Wednesday, July 22, 2009   


The water is refreshing and with a little effort you can create a splash using Adobe Wave without the need of going to the Publisher Portal to get the job done (once it's set up properly).

This post assumes the use of PHP. Other technologies, you're on your own.

The first thing you'll need to do is to obtain an API token used for authentication. Adobe has provided a URL for you to use: https://id-wave.adobe.com/identity/1.0/auth/apitoken.xml.

Cool, now all you need to do is make a little form to POST to that URL and it will return XML back to you containing your token.

<form action=
"https://id-wave.adobe.com/identity/1.0/auth/apitoken.xml"
method="post">
<input type="text" name="username"/>
<input type="text" name="password"/>
<input type="submit" name="submit" id="submit" id="Submit"/>
</form>

I broke the form action line into 3 so it all fit correctly in a modern browser (the column gutter was clipping it). That was easy, you should get a really long string of characters that represents your token (if you entered your credentials correctly into the form). Now that you have your token, you can set up dynamic notifications.

Adobe supplied a samples folder of PHP scripts (zip file).

Upload those somewhere on your server or locally, whatever, and you'll want to edit that apiToken.php file. Where it has $api_token=''; you will want to replace that empty string with your actual token string. You shouldn't need to touch anything else in that file.

Now, to use that notification.php file you uploaded to create your notification, I made another form that contains my "topic" URI. It looks like this:

<form action="http://theURL/notification.php" method="post">
<input type="hidden" name="topic" value="company_XX/feed_XX/XX"/>
Message: <input type="text" name="message" id="message"/><br/>
Link: <input type="text" name="link" id="link"/><br/>
<input type="submit" name="submit" id="submit" id="Submit"/>
</form>

The magic sauce here is the hidden topic parameter sent to the notification.php file. This is the "topic" or the feed you wish to broadcast your notification to. You can get this from your Publisher Portal account for said feed.

Of note: You can also send along a thumbnail (in my case I have chosen not to because I have yet to see one of my notifications accompanied by a declared file I specified). It uses the name of "image" (base64 encoded image data of 40x40 preferred), as well as "imagetype" (of either "image/jpeg" or "image/png").

If you had many feeds, you could always slap the URIs into a drop down menu, or provide that UI in your Flash/Flex/etc.

Now, when you call that notification.php file correctly with your form (or perhaps with triggers you set up for your blog, your application, etc.), it communicates with Adobe and your notification is blasted. It works well.

I don't see a return notification other than I don't get an HTTP status error when it works. I could be overlooking something though.

So in short, this is how you can wire up dynamic notifications for your applications, your blog (posting, etc.), and more without having to visit the Wave Publisher Portal. If I missed something in this post, I apologize and will remedy it. I have gotten this to work all the time and it wasn't too hard to set up (some trial and error did take place however).

And yes, that wave image has free usage rights (thanks Google for adding that kind of detail in advanced image search).

Labels:

 
 Return to the main page
Comments:

There are currently 0 Comments:

 Leave a comment