/**
  * @return Result can be 0 or 1.
  */
 public function execute()
 {
     $type = Api_Bo_Feed::RS_FBDB_FEED_TYPE_STORY;
     $templatized = Api_Bo_Feed::RS_FBDB_FEED_NOT_TEMPLATE;
     $author = $this->getUserId();
     $title = $this->getApiParam('title');
     $body = $this->getApiParam('body');
     $image1 = $this->getApiParam('image_1');
     $image1Link = $this->getApiParam('image_1_link');
     $image2 = $this->getApiParam('image_2');
     $image2Link = $this->getApiParam('image_2_link');
     $image3 = $this->getApiParam('image_3');
     $image3Link = $this->getApiParam('image_3_link');
     $image4 = $this->getApiParam('image_4');
     $image4Link = $this->getApiParam('image_4_link');
     $titleData = $this->getApiParam('title_data');
     $bodyData = $this->getApiParam('body_data');
     $bodyGeneral = $this->getApiParam('body_general');
     $priority = $this->getApiParam('priority');
     $actor = $this->getApiParam('actor_id');
     $targets = $this->getApiParam('targets');
     if (null == $priority || strlen($priority) == 0) {
         $priority = 0;
     }
     $ret = Api_Bo_Feed::createFeed($type, $templatized, $title, $titleData, $body, $bodyData, $bodyGeneral, $author, $image1, $image1Link, $image2, $image2Link, $image3, $image3Link, $image4, $image4Link, $actor, $targets, $priority);
     $response = array();
     if ($ret) {
         $response['result'] = '1';
     } else {
         $response['result'] = '0';
     }
     return $response;
 }
 /**
  * @return Result can be 0 or 1.
  */
 public function execute()
 {
     $type = Api_Bo_Feed::RS_FBDB_FEED_TYPE_ACTION;
     $templatized = Api_Bo_Feed::RS_FBDB_FEED_TEMPLATE_WITH;
     $author = $this->getUserId();
     $title = $this->getApiParam('title_template');
     $body = $this->getApiParam('body_template');
     $image1 = $this->getApiParam('image_1');
     $image1Link = $this->getApiParam('image_1_link');
     $image2 = $this->getApiParam('image_2');
     $image2Link = $this->getApiParam('image_2_link');
     $image3 = $this->getApiParam('image_3');
     $image3Link = $this->getApiParam('image_3_link');
     $image4 = $this->getApiParam('image_4');
     $image4Link = $this->getApiParam('image_4_link');
     $titleData = $this->getApiParam('title_data');
     $bodyData = $this->getApiParam('body_data');
     $bodyGeneral = $this->getApiParam('body_general');
     $priority = $this->getApiParam('priority');
     $targets = $this->getApiParam('target_ids');
     $actor = $this->getApiParam('page_actor_id');
     //            error_log( 'title data: ' . $titleData );
     //            error_log( 'body title: ' . $bodyTitle );
     //            error_log( 'body data: ' . $bodyData );
     //            error_log( 'body general: ' . $bodyGeneral );
     //            error_log( 'page actor id: ' . $actor );
     $ret = Api_Bo_Feed::createTemplatizedFeed($this->getUserId(), $this->getAppId(), $type, $templatized, $author, $title, $body, $image1, $image1Link, $image2, $image2Link, $image3, $image3Link, $image4, $image4Link, $titleData, $bodyData, $bodyGeneral, $priority, $targets, $actor);
     $response = array();
     if ($ret) {
         $response['result'] = '1';
     } else {
         $response['result'] = '0';
     }
     return $response;
 }
Esempio n. 3
0
 public function get()
 {
     return Api_Bo_Feed::getFeedEntries($this->uid, $this->actorid, $this->friends, $this->actions, $this->stories);
 }