print "Signatures don't match! Exiting.<br>"; } else { print "Signatures match!"; // Send notification $userId = @$_GET['opensocial_viewer_id']; $ms = new MySpace($ms_key, $ms_secret, null, null, false); $templateParameters = array('content' => 'Test notification content from php sdk', 'button0_surface' => 'canvas', 'button0_label' => 'Go To App Canvas', 'button1_surface' => 'appProfile', 'button1_label' => 'Go To App Profile'); $rc = $ms->sendNotification('129910', '454304609,28568917', $templateParameters, 'http://api.myspace.com/v1/users/296768296'); echo '<br><br>sendNotification returned ' . $rc; $profileInfo = $ms->getProfile($userId); displayProfileInfo($profileInfo); $albumInfo = $ms->getAlbumInfo($userId, "817520"); displayAlbumInfo($albumInfo); $appData = $ms->getGlobalAppData(); displayObject($appData, "appData"); $ms->putGlobalAppData(array('animal' => 'giraffe', 'plant' => 'rose', 'mineral' => 'sandstone')); sleep(3); $appData = $ms->getGlobalAppData(); displayObject($appData, "appData"); $appData = $ms->getGlobalAppData('animal;plant'); displayObject($appData, "appData for only animal and plant"); $ms->clearGlobalAppData('animal;mineral'); sleep(3); $appData = $ms->getGlobalAppData(); displayObject($appData, "appData"); } function displayObject($obj, $name) { print '<b>' . $name . ' = </b>'; print_r($obj); print '<br/>';