json - Download venues not work - Foursquare API php (search/venues) -
when try download venues foursquare venues search api (e.g. api.foursquare.com/v2/venues/search?near=newyork) return empty json.
here code (php):
<?php        require_once("foursquareapi.class.php");        // set client key , secret       $client_key = "ghxxxxxxxxxxxxxxxxxxxxxxxxx";       $client_secret = "rexxxxxxxxxxxxxxxxxxxxxx";        // load foursquare api library       $foursquare = new foursquareapi($client_key,$client_secret);        // prepare parameters       $params = array("near"=>str_replace(' ', '', $_get['place']));        // perform request authenticated-only resource       $response = $foursquare->getpublic("venues/search",$params);       $venues = json_decode($response);        echo $venues; ?>   $venues empty don't understand why.. suggestion?
ps. $_get['place'] = "newyork" , here work (developer.foursquare.com/docs/explore#req=venues/search%3fnear%3dnewyork)
thanks lot, andrea.
 
 
  
Comments
Post a Comment