StreamSend API Blast Not Working...Please help...

71 views
Skip to first unread message

Emmar Reveriza

unread,
Mar 1, 2013, 7:57:30 AM3/1/13
to streamsend-...@googlegroups.com
Hello guys!

I'm trying to use the Streamsend API Blast... using create method ... I just followed the API Documentation on how to send a request... but I guess there's something wrong here I've done : 

public function create($vars){

$this->optHTTPHEADER(0,'');
$this ->optINCHEADER(true);
$this->setOPT("/audiences/1/blasts.xml","POST");
extract($vars);
if($shed_type == "now"){
$datesched = gmdate("Y-m-d\Th:i:s\Z",time());
}else{
$datesched = $schedule;
}
$xml = "<blast>
   <from>
     <name>Customer Service</name>
     <email-address>{$from}</email-address>
   </from>
   <to>
     <audience-id>1</audience-id>
     <include-lists>{$list_id}</include-lists>
   </to>
   <subject>{$subject}</subject>
   <body>
    [<html-part><![CDATA[ {$body} ]]></html-part>]
   </body>
   <options>
     <track-views>true</track-views>
     <track-clicks>true</track-clicks>
     <include-social-bar>false</include-social-bar>
   </options>
   <scheduled-for>{$datesched}</scheduled-for>
  </blast>";
$this->optPOSTFIELDS($xml);
$this->optRETURNTRANS();
if($this->error()){
$msg = $this->error();
}else{
$msg = $this->execute();
}
return $msg;
}

Please, I really have to get this work... your answer will be much appreciated.

Thanks Guys!


Reply all
Reply to author
Forward
0 new messages