Instagram\Instagram::getUserFeed PHP Method

getUserFeed() public method

Fetch User Feed
public getUserFeed ( string | User $userId, string $maxId = null ) : UserFeedResponse
$userId string | Instagram\API\Response\Model\User User or User Id to get Feed of
$maxId string Next Maximum Id, used for Pagination
return Instagram\API\Response\UserFeedResponse
    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;
    }