public function logout() { if (!$this->isLoggedIn()) { throw new InstagramException("You must be logged in to call logout()."); } $request = new LogoutRequest($this); return $request->execute(); }