“Mancante} dopo l'elenco delle proprietà” in funzione di FB.subclass all.js di file
-
25-10-2019 - |
Domanda
Voglio creare un'applicazione su Facebook, dopo aver fatto come il tutorial da FB sito dello sviluppatore. Ho ottenuto l'errore al passo utilizzando Javascript SKD, cerco di ottenere questa funzione, ed è davvero scorretto.
Mi permetta di mostrare di più la mia domanda:
Ecco le mie impostazioni:
Summary
App ID/API Key App Secret
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
Canvas Page Canvas URL
https://apps.facebook.com/ibattleship/ http://192.168.11.154:8091/
Secure Canvas URL Canvas FBML/iframe
https://192.168.11.154/ iframe
Contact Email Support Email
xxxxxxx@gmail.com xxxxxx@gmail.com
e il file index.php:
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo APP_ID ?>', // App ID
channelURL : '//192.168.11.154:8091/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : true // parse XFBML
});
};
// Load the SDK Asynchronously
(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));
// Additional initialization code here
</script>
Hello, world.
</body>
</html>
e il file channel.html
<?php
$cache_expire = 60*60*24*365;
header("Pragma: public");
header("Cache-Control: maxage=".$cache_expire);
header('Expires: '.gmdate('D, d M Y H:i:s', time()+$cache_expire).' GMT');
?>
<script src="//connect.facebook.net/en_US/all.js"></script>
Ma, quando ho eseguito questa pagina, ho ottenuto l'errore precedente. Mi sono perso qualcosa?
Soluzione
Questo è un bug da Facebook Javascript SDK.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow