src/snapchat.php
public function setStory($media_id, $media_type, $time = 3) {
		// Make sure we're logged in and have a valid access token.
		if (!$this->auth_token || !$this->username) {
			return FALSE;
		}

		$timestamp = parent::timestamp();
		$result = parent::post(
			'/post_story',
			array(
				'client_id' => $media_id,
				'media_id' => $media_id,
				'time' => $time,
				'timestamp' => $timestamp,
				'type' => $media_type,
				'username' => $this->username,
			),
			array(
				$this->auth_token,
				$timestamp,
			)
		);

		return is_null($result);
	}
public function setStory($media_id, $media_type, $time = 3) {
		// Make sure we're logged in and have a valid access token.
		if (!$this->auth_token || !$this->username) {
			return FALSE;
		}

		$timestamp = parent::timestamp();
		$result = parent::post(
			'/post_story',
			array(
				'client_id' => $media_id,
				'media_id' => $media_id,
				'time' => $time,
				'timestamp' => $timestamp,
				'type' => $media_type,
				'username' => $this->username,
			),
			array(
				$this->auth_token,
				$timestamp,
			)
		);

		return is_null($result);
	}
public function setStory ( $ media_id , $ media_type , $ time = 3 ) { // Make sure we're logged in and have a valid access token. if ( ! $ this -> auth_token || ! $ this -> username ) { return FALSE ; } $ timestamp = parent :: timestamp ( ) ; $ result = parent :: post ( '/post_story' , array ( 'client_id' => $ media_id , 'media_id' => $ media_id , 'time' => $ time , 'timestamp' => $ timestamp , 'type' => $ media_type , 'username' => $ this -> username , ) , array ( $ this -> auth_token , $ timestamp , ) ) ; return is_null ( $ result ) ; }
Sets a story.

@param string $media_id
The media ID of the story to set.
@param int $media_type
The media type of the story to set (i.e. MEDIA_IMAGE or MEDIA_VIDEO).
@param int $time
The time in seconds the story should be available (1-10). Defaults to 3.

@return bool
TRUE if successful, FALSE otherwise.
Sets a story .