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