title: What is wrong with my foursquare api call?
body: <p>The live example is here
  <a href="http://kenziejoy.github.io/frontend-nanodegree-map/" rel="nofollow">http://kenziejoy.github.io/frontend-nanodegree-map/</a></p>
  
  <p>I'm trying to pull data about locations that I have hard coded in an array - either by their foursquare id (didn't seem to be working) or their lat and lng. (client ID and secret are variables I just haven't shown them here)</p>
  
  <p>I don't need any other functionality than just pulling data from their database to display on a map so I thought it would fall under the userless access but it is giving me an error that the request are bad because I don't have the proper authentication. </p>
  
  <p>Thanks in advance </p>
  
  <p>From the foursquare site
  "Userless access</p>
  
  <p>Some of our endpoints that don’t pertain to specific user information, such as venues search are enabled for userless access (meaning you don’t need to have a user auth your app for access). To make a userless request, specify your consumer key's Client ID and Secret instead of an auth token in the request URL.</p>
  
  <p><a href="https://api.foursquare.com/v2/venues/search?ll=40.7,-74&amp;client_id=CLIENT_ID&amp;client_secret=CLIENT_SECRET&amp;v=YYYYMMDD" rel="nofollow">https://api.foursquare.com/v2/venues/search?ll=40.7,-74&amp;client_id=CLIENT_ID&amp;client_secret=CLIENT_SECRET&amp;v=YYYYMMDD</a></p>
  
  <p>To see what level of permissions each endpoint needs, check out the filters at the top of our endpoints page."</p>
  
  <pre><code>        /**********FourSquare***************/
      $.ajax({
          url:'https://api.foursquare.com/v2/venues/search',
          dataType: 'json',
          data: 'limit=1' +
                  '&amp;ll='+ placeItem.lat() +','+ placeItem.lng() +
                  '&amp;?client_id='+ CLIENT_ID +
                  '&amp;client_secret='+ CLIENT_SECRET +
                  '&amp;v=20140806' +
                  '&amp;m=foursquare',
          async: true,
  
          success: function (data) {
              var result = data.response.venue;
              var contact = result.hasOwnProperty('contact') ? result.contact : '';
              if (contact.hasOwnProperty('formattedPhone')) {
                  placeItem.phone(contact.formattedPhone || '');
              }
  
              var location = result.hasOwnProperty('location') ? result.location : '';
              if (location.hasOwnProperty('address')) {
                  placeItem.address(location.address || '');
              }
  
              var bestPhoto = result.hasOwnProperty('bestPhoto') ? result.bestPhoto : '';
              if (bestPhoto.hasOwnProperty('prefix')) {
                  placeItem.photoPrefix(bestPhoto.prefix || '');
              }
  
              if (bestPhoto.hasOwnProperty('suffix')) {
                  placeItem.photoSuffix(bestPhoto.suffix || '');
              }
  
              var description = result.hasOwnProperty('description') ? result.description : '';
              placeItem.description(description || '');
  
              var rating = result.hasOwnProperty('rating') ? result.rating : '';
              placeItem.rating(rating || 'none');
  
              var url = result.hasOwnProperty('url') ? result.url : '';
              placeItem.url(url || '');
  
              placeItem.canonicalUrl(result.canonicalUrl);
  
              // Infowindow code is in the success function so that the error message
  
              // Content of the infowindow
              var contentString = '&lt;div id="iWindow"&gt;&lt;h4&gt;' + placeItem.name() + '&lt;/h4&gt;&lt;div id="pic"&gt;&lt;img src="' +
                      placeItem.photoPrefix() + '110x110' + placeItem.photoSuffix() +
                      '" alt="Image Location"&gt;&lt;/div&gt;&lt;p&gt;Information from Foursquare:&lt;/p&gt;&lt;p&gt;' +
                      placeItem.phone() + '&lt;/p&gt;&lt;p&gt;' + placeItem.address() + '&lt;/p&gt;&lt;p&gt;' +
                      placeItem.description() + '&lt;/p&gt;&lt;p&gt;Rating: ' + placeItem.rating() +
                      '&lt;/p&gt;&lt;p&gt;&lt;a href=' + placeItem.url() + '&gt;' + placeItem.url() +
                      '&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a target="_blank" href=' + placeItem.canonicalUrl() +
                      '&gt;Foursquare Page&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a target="_blank" href=https://www.google.com/maps/dir/Current+Location/' +
                      placeItem.lat() + ',' + placeItem.lng() + '&gt;Directions&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;';
  
              // Add infowindows
                  google.maps.event.addListener(placeItem.marker, 'click', function () {
                  infowindow.open(map, this);
                  // Bounce animation
                  placeItem.marker.setAnimation(google.maps.Animation.BOUNCE);
                  setTimeout(function () {
                      placeItem.marker.setAnimation(null);
                  }, 800);
                  infowindow.setContent(contentString);
              });
      },
  
          // Alert the user on error.
          error: function (e) {
              infowindow.setContent('&lt;h5&gt;Foursquare data is unavailable.&lt;/h5&gt;');
              document.getElementById("error").innerHTML = "&lt;h4&gt;Foursquare data is unavailable. Please try refreshing.&lt;/h4&gt;";
      }
      });
  </code></pre>