Javascript Facebook即时游戏-上传捆绑的zip文件导致来自Web托管的SDK引用错误
当我尝试上传我的简单游戏/应用程序时,我会收到一个错误提示 “游戏必须通过CDN引用我们支持的SDK之一。” 我已经给出了一个SDK参考。这不是那个吗Javascript Facebook即时游戏-上传捆绑的zip文件导致来自Web托管的SDK引用错误,javascript,html,sdk,facebook-javascript-sdk,facebook-instant-games,Javascript,Html,Sdk,Facebook Javascript Sdk,Facebook Instant Games,当我尝试上传我的简单游戏/应用程序时,我会收到一个错误提示 “游戏必须通过CDN引用我们支持的SDK之一。” 我已经给出了一个SDK参考。这不是那个吗 我也浏览了facebook文档的SDK参考,但它对我不起作用? 以前有没有人遇到过同样的情况,或者有想法解决这个问题?多谢各位 我有一个index.html文件 INDEX.HTML <html> <head> <title> this is test </title>
我也浏览了facebook文档的SDK参考,但它对我不起作用?
以前有没有人遇到过同样的情况,或者有想法解决这个问题?多谢各位
我有一个index.html文件
INDEX.HTML
<html>
<head>
<title>
this is test
</title>
<style>
body {
width: 400px;
height: 400px;
position: 0;
background: yellow;
}
#heading1{
position: absolute;
}
</style>
</head>
<body>
<h1 id="heading1">
This is h1.
</h1>
<button onclick="myFunction()">Move the heading</button>
<script>
var ran = Mathfloor.Math.Random()*1;
function myFunction() {
var move= document.getElementById("heading1");
var pos = 0;
var id = setInterval(frame, 5);
function frame() {
if (pos == 350) {
clearInterval(id);
var id1 = setInterval(framenext, 5);
} else {
pos++;
if (ran ==1) {
move.style.top = pos + "px"; }else {
move.style.left = pos + "px"; }
}
}
function framenext() {
if (pos == 0) {
clearInterval(id1);
var id = setInterval(framenext, 5);
} else {
pos--;
if (ran ==1) {
move.style.top = pos + "px"; }else {
move.style.left = pos + "px"; }
}
}
}
</script>
<script src="https://connect.facebook.net/en_US/fbInstant.6.2.js"</script>
</body>
</html>
fbapp-config.json必须至少具有以下三个键值对:
比赛开始了
测试成功。谢谢,你知道如何与朋友分享我的游戏吗?它不会显示在他们的帐户上。它只显示黑屏,但我可以播放,我已经点击了喜欢的按钮。我不知道为什么它没有显示。在您提交审核之前,您的游戏无法播放。一旦你的游戏通过审查,那么只有它是可见的和可玩的。Live或Dev模式仅对测试用户和开发人员可见。您可以从应用程序设置中的角色设置此类角色访问权限。尝试在测试用户中添加好友。你还没有接受我的答案,并对我的答案投了赞成票。:)我投了赞成票。上面写着“谢谢你的反馈!那些声誉低于15的人所投的票会被记录下来,但不会改变公开显示的帖子分数。”
{
"instant_games":{
"navigation_menu_version": "NAV_FLOATING",
}
}
<body>
<script src="https://connect.facebook.net/en_US/fbinstant.6.2.js"></script>
<h1 id="heading1">
This is h1.
</h1>
<button onclick="myFunction()">Move the heading</button>
<script>
window.onload = function () {
FBInstant.initializeAsync().then(function () {
FBInstant.setLoadingProgress(100);
});
FBInstant.startGameAsync().then(function () {
startGame();
})
};
</script>
<script>
var ran = Math.floor(Math.random() * 1);
your script codes here...
</script>
</body>
</html>
{
"instant_games": {
"platform_version": "RICH_GAMEPLAY",
"orientation": "LANDSCAPE",
"navigation_menu_version": "NAV_FLOATING"
}
}