大家好,我的foursquare api项目出错了。我有所有需要的信息,并概述了如何设置api文档,但我仍然收到加载错误。这是我的代码,这里是错误。如果有人可以帮助我github存储库将在下面列出
var fourSquareMain = 'https://api.foursquare.com/v2/venues/search';
var clientID = '5LHFTY54EP5VLMYIIVZ0OQGMNZQEM2FUKDPFFA2OJHMO0AVI';
var clientSecret = '2TN3GQBAX4U2GPHGMCUZWS35Y2E5E2Y4NG0YWGVGNMXEPHAW';
var fourSquareVersion = '20160908';
var fourSquareLL = '&ll=' + pointItem.lat() + ',' + pointItem.lng();
var fourSquareQuery = '&query=' + pointItem.name;
var venue_id = pointItem.formattedName();
var url = fourSquareMain + '/' + venue_id;
var fullFourSquareQuery = fourSquareMain + clientID + clientSecret + fourSquareVersion + fourSquareLL + fourSquareQuery;
var finalFSQuery = fullFourSquareQuery.replace(/ /g, '-');
console.log(finalFSQuery);
$.ajax({
url: url,
dataType: 'json',
data: {
client_id: "5LHFTY54EP5VLMYIIVZ0OQGMNZQEM2FUKDPFFA2OJHMO0AVI",
client_secret: "2TN3GQBAX4U2GPHGMCUZWS35Y2E5E2Y4NG0YWGVGNMXEPHAW",
v: fourSquareVersion,
async: true
}
});
这是错误
this is the error that i am getting
github repostory:https://github.com/omar-jandali/udacity-map