0
facebook app에서 javascript를 통해 초대 친구 요청을하는 데 문제가 있습니다. 내 코드는 다음과 같습니다 당연히Facebook 초대 친구 요청 javascript
<div id="fb-root"></div>
<script>
$(function() {
FB.init({
appId : '<?php echo APP_ID;?>', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
frictionlessRequests : true,
});
FB.Canvas.setAutoGrow();
function sendRequestViaMultiFriendSelector(){
FB.ui({method: 'apprequests',
message: 'My Great Request DONALD'
});
}
});
</script>
, 내가 가져온 JS SDK를 통해 :
<script src="http://connect.facebook.net/en_US/all.js"></script>
내가 친구 초대하기 버튼 바인더 제본 : 내 페이지에서
$('.step2').children('.tasto').click(function(){
//sendRequestViaMultiFriendSelector();
console.log("Gooby pls");
});
을, 콘솔에서이 오류를 만듭니다.
Unsafe JavaScript attempt to access frame with URL http://apps.facebook.com/termapp/ from frame with URL https://s-static.ak.facebook.com/connect/xd_arbiter.php?version=9#channel=f25e11b77&origin=http%3A%2F%2Fwww.termapp.test&channel_path=%2F%3Ffb_xd_fragment%23xd_sig%3Df3245a897%26. Domains, protocols and ports must match.
당연히 버튼이 작동하지 않습니다.
저는 Chrome에 있으며 제 사이트는 Zend와 함께 php로 만들어졌습니다. 가상 호스트에 있기 때문에 응용 프로그램을 표시 할 수 없습니다.
을 나는 그것이 생각 크롬 문제! 내가 어떻게 고칠 수 있니? –