Hi, other APIs work well for me. But notification api doesn't work as I expect. Would you please have a look at my code here? Is there anything wrong?
function sl_myspace_api_send_notification(){
require_once 'MySpaceID/myspace.php';
$account = sl_myspace_load_account();
if($account){
$session_key = unserialize($account['session_key']);
$ms = new MySpace(MYSPACE_CUSTOMER_KEY, MYSPACE_CUSTOMER_SECRET, $session_key['key'], $session_key['secret']);
$userid = $ms->getCurrentUserId();
$templateParams['content'] = 'MySpaceID is so banana :P!';
$templateParams['button0_surface'] = 'canvas';
$templateParams['button0_label'] = 'Blah blah blah!';
$mediaItems = 'http://api.myspace.com/v1/users/'.$userid;
$recipients = $userid;
$ms->sendNotification(APP_ID, $recipients, $templateParams, $mediaItems);
drupal_set_message(t('Done!'));
}else{
drupal_set_message(t('Damn!'));
}
}
The return code is 1 and response message is 'Done!'. But when I check Mail/Notifications, I don't see anything.
Thanks for any help!
Sang.