我查看了浏览器中的源代码 facebbok 在代码中创建了一个表单,这
<form method="post" id="proxy_form"> <input type="hidden" autocomplete="off" id="signed_request" name="signed_request" /> </ form> <script> document.domain = "facebook . to ";
FrameName window.location.href.split var = ('#') [1];
submitForm function (appTabUrl, signedRequest) {
var proxyForm = document.getElementById ("proxy_form");
proxyForm.setAttribute ("action", appTabUrl);
proxyForm.setAttribute ("target", FrameName);
var input = document.getElementById ("signed_request");
input.setAttribute ("value", signedRequest);
proxyForm.submit ();
}
waitForParams function () {
if (parent.PlatformAppController &&
parent.PlatformAppController.getFrameParams (FrameName) &&
document.getElementById ("proxy_form") &&
document.getElementById ("signed_request")) {
var params =
parent.PlatformAppController.getFrameParams (FrameName);
submitForm (params.appTabUrl, params.signedRequest);
Else {}
setTimeout (waitForParams, 10);
}
}
waitForParams (); </ script> <div <noscript> class="pam uiBoxGray"> You need to enable Javascript in your browser to use Facebook Applications. </ div> </ noscript>
我的 javascript 已启用,我测试了 3 台不同的机器