Answer the question
In order to leave comments, you need to log in
jquery get facebook request?
Good afternoon, tell me what's wrong with the jquery request?
$.ajax({
url: 'https://www.facebook.com/',
success: function(data){
console.log(data);
},
error: function(data){
console.log(data);
},
type: "GET",
dataType: "text"
});
Request from foreign origin blocked: The single origin policy prohibits reading the remote resource at https://www.facebook.com/ . This can be fixed by moving the resource to the same domain or by enabling CORS.
Answer the question
In order to leave comments, you need to log in
You seem to know how to read, since you somehow came here. What prevented you from reading this error message? The same-origin policy has been chewed up on the internet more times, perhaps, than the differences between Java and JavaScript.
Unfortunately, I did not find a clear solution to the problem, so I wrote here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question