Instagram\Instagram::getLocationFeed PHP Method

getLocationFeed() public method

Fetch Location Feed
public getLocationFeed ( string | Location $locationId, string $maxId = null ) : LocationFeedResponse
$locationId string | Instagram\API\Response\Model\Location Location or Location Id to get Feed of
$maxId string Next Maximum Id, used for Pagination
return Instagram\API\Response\LocationFeedResponse
    public function getLocationFeed($locationId, $maxId = null)
    {
        if (!$this->isLoggedIn()) {
            throw new InstagramException("You must be logged in to call getLocationFeed().");
        }
        if ($locationId instanceof Location) {
            $locationId = $locationId->getPk();
        }
        $request = new LocationFeedRequest($this, $locationId, $maxId);
        $response = $request->execute();
        if (!$response->isOk()) {
            throw new InstagramException(sprintf("Failed to getLocationFeed: [%s] %s", $response->getStatus(), $response->getMessage()));
        }
        return $response;
    }