В настоящее время я ищу приложение для Facebook. Таким образом, я буквально просто копирую файлы из документации на свою страницу, и я продолжаю получать следующие ошибки в консоли:
Uncaught SecurityError: Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080". Protocols, domains, and ports must match. VM2813:1
Uncaught SecurityError: Blocked a frame with origin "https://s-static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
VM2817:1
Uncaught SecurityError: Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080". Protocols, domains, and ports must match.
Таким образом, я затем добавил, чтобы добавить http://localhost:8080
на страницу моего Facebook-приложения, и все же я все равно получаю ту же ошибку.
Вот код, который я использую:
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '644205045632878',
status : true,
xfbml : true
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</body>
Пожалуйста, кто-нибудь может объяснить, что здесь не так. Это мой первый раз, делая это...