Adobe Wave is a new real-time notification system currently in Adobe
Labs. Those who download the desktop application (which is an Adobe AIR app) can then subscribe to receive notifications from their favorite
sites - more about Adobe Wave: http://labs.adobe.com/technologies/wave/
I was working on a web project and wanted to integrate the
Adobe Wave service. After reviewing the REST API for Adobe Wave is was quite confused. Christian Grobmeier developed a WordPress plug-in for
Adobe Wave (
http://blog.grobmeier.de/2009/08/04/adobe-wave-wordpress-plugin-finished.html). After downloading and
making some modifications to his PHP code I was able to get my web project to connect to the Adobe Wave services. Note: If you want to connect
to the Adobe Wave services you must first apply/register for a publisher account:
https://ps-wave.adobe.com/portal/PublisherAdmin.html Here is a zip file to download:
http://web.ics.purdue.edu/~fgarofal/examples/WaveIntegrationDemo.zipIn the below code example, you will need
the PHP classes from the zip file in the link above. Also you will need to swap out "adobe_id" and "adobe_pass" with your Adobe account
information once you have been approved as a publisher. Assuming you have an approved publisher account, then you can create a "feed" from the
feed you will need to replace "URI" with the URI code you receive from the Wave Publisher Portal for that specific feed.
include('APIToken2.php');
include('WaveException.php');
include('BroadcastMessage.php');
//Prepare
Post
$post_string = "Hello Adobe Wave";
$post_string = substr($post_string, 0, 140);
//Build Post
$post = array();
$post0->post_title = $post_string;
$post0->guid = "http://labs.adobe.com/technologies/wave/";
$result =
waveIntegration_send('adobe_id','adobe_pass','URI', $post);
if ($result == true) {
echo 'Success';
} else
{
echo 'Error';
}
//waveIntegration_send
//---------------------
//Input: string (username), string
(password), array (post: string title, string url link)
//Output: bool (true - successful, false - error)
function
waveIntegration_send($username, $password, $topic, $posts) {
if($username == '' || $password == '' || $topic == '') {
// no action - error would be nice
return;
}
$title = $posts0->post_title;
$link =
$posts0->guid;
$token = APIToken::getInstance($username, $password);
$tokenValue = $token->getToken();
$message = new BroadcastMessage(
$tokenValue,
$topic,
$title, $link);
$code = $message->send();
if ($code >= 200 && $code <
300) {
return true;
} else {
return false;
}
}
If you have any questions,
please let me know. For other resources check out the Adobe Wave section of the Adobe Forums:
http://forums.adobe.com/community/labs/wave