/** * Register an action on the post. You must provide an oauth_token with this method. * @param int $id The ID of the post. * @param string $action_id The ID of the action. * @param string $oauth_token The OAuth token provided from a user accreditation. * @return array */ public function do_action($id, $action_id, $oauth_token) { // Fetch response $response = $this->master->_request($this->resource . "/" . $id . "/" . $action_id . "?oauth_token=" . $oauth_token, NULL, OHC_API_METHOD_POST); // Throw an error if there is an error if ($response["success"] == FALSE) { throw new Exception($response["error"]); return FALSE; } // Return response data return $response["data"]; }