I want to call this link for the like on instagram, I am using following code but it is not working. Following error comes, please help me how I call this url from local host and server also.
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.