src/snapchat.php
public function login($username, $password) {
		$timestamp = parent::timestamp();
		$result = parent::post(
			'/login',
			array(
				'username' => $username,
				'password' => $password,
				'timestamp' => $timestamp,
			),
			array(
				parent::STATIC_TOKEN,
				$timestamp,
			)
		);

		// If the login is successful, set the username and auth_token.
		if (isset($result->logged) && $result->logged) {
			$this->auth_token = $result->auth_token;
			$this->username = $result->username;

			$this->cache = new SnapchatCache();
			$this->cache->set('updates', $result);

			return $result;
		}
		else {
			return FALSE;
		}
	}
public function login($username, $password) {
		$timestamp = parent::timestamp();
		$result = parent::post(
			'/login',
			array(
				'username' => $username,
				'password' => $password,
				'timestamp' => $timestamp,
			),
			array(
				parent::STATIC_TOKEN,
				$timestamp,
			)
		);

		// If the login is successful, set the username and auth_token.
		if (isset($result->logged) && $result->logged) {
			$this->auth_token = $result->auth_token;
			$this->username = $result->username;

			$this->cache = new SnapchatCache();
			$this->cache->set('updates', $result);

			return $result;
		}
		else {
			return FALSE;
		}
	}
public function login ( $ username , $ password ) { $ timestamp = parent :: timestamp ( ) ; $ result = parent :: post ( '/login' , array ( 'username' => $ username , 'password' => $ password , 'timestamp' => $ timestamp , ) , array ( parent :: STATIC_TOKEN , $ timestamp , ) ) ; // If the login is successful, set the username and auth_token. if ( isset ( $ result -> logged ) && $ result -> logged ) { $ this -> auth_token = $ result -> auth_token ; $ this -> username = $ result -> username ; $ this -> cache = new SnapchatCache ( ) ; $ this -> cache -> set ( 'updates' , $ result ) ; return $ result ; } else { return FALSE ; } }
Handles login.

@param string $username
The username for the Snapchat account.
@param string $password
The password associated with the username.

@return mixed
The data returned by the service or FALSE if the request failed.
Generally, returns the same result as self::getUpdates().
Handles login .