セットアップ:
動作中の Facebook アプリを取得し、Facebook クレジット トランザクション用に正しくセットアップされています (つまり、サーバー側のすべてが正常に動作しています)。
Firefox と Chrome ではトランザクションは問題なく完了しますが、IE8 では購入ダイアログを完了/閉じる際のコールバックで次のエラーがスローされます。
エラー 1:
Line: 52 Error: Object doesn't support this property or method
Object doesn't support this property or method JScript - script block, line 52 character 37
それが指す関数は次のとおりです。
ui: function( params )
{
obj = FB.JSON.parse( params );
method = obj.method;
cb = function( response ) { FBAS.getSwf().uiResponse( FB.JSON.stringify( response ), method ); }
FB.ui( obj, cb );
},
このビットを具体的に強調します。
FBAS.getSwf().uiResponse( FB.JSON.stringify( response ), method )
http://connect.facebook.net/en_US/all.jsファイルで
エラー 2:
行: 65 エラー: オブジェクトはこのアクションをサポートしていませ
ん オブジェクトはこのアクションをサポートしていません all.js、65 行目の文字 2198
[それが指している行はばかげて長いフォーマット化されていない読めない混乱なので、要求されない限り省略します]
このビットを具体的に強調します。
delete d._old_visibility
再びhttp://connect.facebook.net/en_US/all.jsファイルに
私が使用しているhtml(アプリを識別するものを削除したもの)は次のとおりです。
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Expires" content ="0" />
<meta http-equiv="Pragma" content ="no-cache" />
<meta http-equiv="Cache-Control" content ="no-cache" />
<title>[ APP NAME ]</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
$(document).ready
(
function()
{
var appId = [ APP ID ];
var host = [ APP HOST ];
// If the user did not grant the app authorization go ahead and
// tell them that. Stop code execution.
if (0 <= window.location.href.indexOf ("error_reason"))
{
$(document.body).append ("<p>Authorization denied!</p>");
return;
}
// Loads the Facebook SDK script.
(function(d)
{
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
// When the Facebook SDK script has finished loading init the
// SDK and then get the login status of the user. The status is
// reported in the handler.
window.fbAsyncInit = function()
{
//debugger;
FB.init(
{
appId : appId,
status : true,
cookie : true,
oauth : true,
});
FB.getLoginStatus (onCheckLoginStatus);
};
// Handles the response from getting the user's login status.
// If the user is logged in and the app is authorized go ahead
// and start running the application. If they are not logged in
// then redirect to the auth dialog.
function onCheckLoginStatus (response)
{
if (response.status != "connected")
{
top.location.href = "https://www.facebook.com/dialog/oauth?client_id=" + appId + "&redirect_uri=" + encodeURIComponent (host+"[ RELATIVE APP PATH ]") + "&scope=publish_stream,user_about_me,read_friendlists,user_photos";
}
else
{
// Start the application
loadGame();
}
}
}
);
function loadGame()
{
var flashvars = {};
var params = {};
var attributes = {};
params.allowscriptaccess = "always";
attributes.id = 'flashContent';
attributes.name = 'flashContent';
swfobject.embedSWF("[ APP SWF ]?"+Math.floor(Math.random()*10000), "flashContent", "100%", "99%", "10.0", null, flashvars, params, attributes);
}
</script>
<div id="flashContent" >
Loading...
</div>
</body>
これは IE 8 の単なる問題ですが、かなりの数のユーザー トランザクションが失敗する (または、コールバックが失敗したために完了し、課金され、有効にならない) ため、アプリの稼働が停止しています。
過去数日間、私はこれまたは同様の問題を抱えている他の人を探していましたが、役に立ちませんでした.
私は、javascript変数がグローバルに作成され、IEで予約されているキーワードを使用して干渉や変数の名前が付けられていることについて人々が警告されるという同様の問題を見てきましたが、私が知る限り、ここではどちらも当てはまりません。Facebook の JavaScript コードは、Facebook の開発ページや信頼できる情報源から拾ってきた定型的なものです。それは JQuery かもしれません (私はほとんど経験がありません)。
誰でも助けることができますか?