iframe Facebook 앱을 개발 중입니다.도메인 간 통신
어떤 시점에서, 나는 내 애플 리케이션에 특정한 로직을 추가 할 수 있도록 html 버튼을 넣은 페이스 북 친구 대화 상자를 엽니 다.
dialog = FB.ui({
method:'fbml.dialog',
fbml: (
'<fb:request-form target="_self" action="http://devel.home.net/facebook/?cmd=fb_submit_form" ' +
'method="post" invite="false" type="event" ' +
'content="Would you like to attend the '+fb.EVENT.displayName+' event? <fb:req-choice url=\'http://www.facebook.com/event.php?eid='+fb.EVENT.details.fb_event.id+'\' label=\'Respond now\' />" >' +
emails.join('') +
'<input type="hidden" fb_protected="true" name="event" value="'+fb.RESPONSE.id+'"/>' +
'<fb:multi-friend-selector email_invite="false" import_external_friends="false" exclude_ids="'+appUsers+'"'+
'condensed="true" showborder="false" bypass="cancel" actiontext="Invite your friends to join" /> '+
'<br/><fb:request-form-submit import_external_friends="false"/>' +
'</fb:request-form>' +
'<div style="padding:10px">You are also sending '+fb.EMAILS.length+' invitations via email</div>' +
'<button id="email-button">Send Emails</button>'
),
size: { width:640, height:480}, width:640, height:480
});
$('.fb_dialog_iframe').find('IFRAME').load(function(){
$(this).contents().find('#email-button').click(function(){
alert(1)
});
})
기본적으로, 페이스 북은 내가 iframe이에 onLoad 핸들러를 첨부 그래서 대화
에 대한 iframe이를 만들고 난 권한 거부 오류를 얻을에서 버튼
에 액세스하려고
Permission denied for <http://devel.home.net> (document.domain=<http://home.net>) to get property HTMLDocument.ownerDocument from <https://www.facebook.com> (document.domain=<https://facebook.com>).
해결 방법이 있습니까?
감사
죄송합니다, 아니요;) –
도움을 주신 분들께 – Thomas