public function changeProfilePicture($path)
{
if (!$this->isLoggedIn()) {
throw new InstagramException("You must be logged in to call changeProfilePicture().");
}
$request = new ChangeProfilePictureAccountRequest($this, $path);
$response = $request->execute();
if (!$response->isOk()) {
throw new InstagramException(sprintf("Failed to changeProfilePicture: [%s] %s", $response->getStatus(), $response->getMessage()));
}
return $response;
}