Instagram\API\Request\PlacesFacebookSearchRequest::searchByLocation PHP Method

searchByLocation() public method

Search Places by Location
public searchByLocation ( $lat, $long )
$lat string Latitude
$long string Longitude
    public function searchByLocation($lat, $long)
    {
        if ($lat != null && $long != null) {
            $this->addParam("lat", $lat);
            $this->addParam("lng", $long);
        }
    }

Usage Example

 /**
  *
  * Search Facebook Places by Location
  *
  * @param string $latitude Latitude
  * @param string $longitude Longitude
  * @return API\Response\PlacesFacebookSearchResponse
  * @throws Exception
  */
 public function searchFacebookPlacesByLocation($latitude, $longitude)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call searchFacebookPlacesByLocation().");
     }
     $request = new PlacesFacebookSearchRequest($this);
     $request->searchByLocation($latitude, $longitude);
     $response = $request->execute();
     if (!$response->isOk()) {
         throw new InstagramException(sprintf("Failed to searchFacebookPlacesByLocation: [%s] %s", $response->getStatus(), $response->getMessage()));
     }
     return $response;
 }
All Usage Examples Of Instagram\API\Request\PlacesFacebookSearchRequest::searchByLocation