lundi 23 juin 2014

Searching Local Venues With Foursquare API


Vote count:

0




I am searching foursquare for venues around my area. I cannot get the search function to work. This is the documentation on it,


Click Here


This is my search form,



<div class="row">
<div class="col-sm-6 text-center">
<div class="signup-form">
<form class="clearfix" action="actions/fsSearch.php" method="post">
<div class="form-group">
<h3>sup bro</h3>
<input type="text" class="form-control" name="query" placeholder="do iT">
</div>
</div>
<button type="submit" name="submit" value="post" class="btn btn-huge btn-info">Search For Places!</button>
</form>
</div>
</div>


This is my search foursquare script,



<?php

$client_id = "foo";
$secret = "foo";
$redirect = "http://ift.tt/1nyHjvY";

$fsSearch = file_get_contents("http://ift.tt/1cJhUki
?client_id=" . $client_id . "
&client_secret=" . $secret . "
&v=20140623
&ll=40.7,-74
&query=".$query);

$searchResults = json_decode($fsSearch,true);
header("Location: http://ift.tt/1nyHjvY");

?>


Then when I var_dump($searchResults); I get a null result.


I dont see what I am doing wrong here...



asked 19 secs ago






Aucun commentaire:

Enregistrer un commentaire