/**
*
* Fetch User Feed
*
* @param string|API\Response\Model\User $userId User or User Id to get Feed of
* @param string $maxId Next Maximum Id, used for Pagination
* @return API\Response\UserFeedResponse
* @throws Exception
*/
public function getUserFeed($userId, $maxId = null)
{
if (!$this->isLoggedIn()) {
throw new InstagramException("You must be logged in to call getUserFeed().");
}
if ($userId instanceof User) {
$userId = $userId->getPk();
}
$request = new UserFeedRequest($this, $userId, $maxId);
$response = $request->execute();
if (!$response->isOk()) {
throw new InstagramException(sprintf("Failed to getUserFeed: [%s] %s", $response->getStatus(), $response->getMessage()));
}
return $response;
}