我想在Instagram上调用此类链接,我正在使用以下代码,但它无法正常工作.出现以下错误,请帮助我如何从本地主机和服务器调用此URL.
var likeurl = "https://api.instagram.com/v1/media/" + idslist[1] + "/likes?ACCESS_TOKEN=" + accesstoken;
Nextin_downloadData(likeurl);
$.ajax({
url: likeurl,
type: 'POST',
data: {
},
success: function (result) {
alert("out" + result);
},
error: function () {
alert("error");
}
});
Error : XMLHttpRequest cannot load https://api.instagram.com/v1/media/714346267865083830_540073674/likes? ACCESS_TOKEN=1281148571.506af84.fc2e95e7257fdhgu5thca. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:2356' is therefore not allowed access.
Run Code Online (Sandbox Code Playgroud)