Hello everyone, I'm encountering a minor issue while attempting to access the foursquare api in order to gather information about a specific restaurant that I've entered into the search bar.
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Additionally, when I input the search query directly into the URL to view the results, I'm met with some strange code appearing on the page.
Here's the HTTP request results displayed by the browser
Below is the code snippet that I'm currently working with...
var fourSquareMain = 'https://api.foursquare.com/v2/venues/search';
var clientID = '?client_id=5LHFTY54EP5VLMYIIVZ0OQGMNZQEM2FUKDPFFA2OJHMO0AVI';
var clientSecret = '&client_secret=2TN3GQBAX4U2GPHGMCUZWS35Y2E5E2Y4NG0YWGVGNMXEPHAW';
var fourSquareVersion = '&v=20130815';
var fourSquareLL = '&ll=' + pointItem.lat() + ',' + pointItem.lng();
var fourSquareQuery = '&query=' + pointItem.name;
var fullFourSquareQuery = fourSquareMain + clientID + clientSecret + fourSquareVersion + fourSquareLL + fourSquareQuery;
var finalFSQuery = fullFourSquareQuery.replace(/ /g, '-');
console.log(finalFSQuery);