I have this problem too. My game is html5-javascript. I can only submit an IFrame.
So i don’t understand the js sample. Do i need to integrate the following into my game iframe?
<!-- Load the Kongregate Javascript API -->
API is finished loading
function onLoadCompleted(){
// Get a global reference to the kongregate API. This way, pages included in the
// iframe can access it by using “parent.kongregate”
kongregate = kongregateAPI.getAPI();
// Embed the game into the “contentdiv” div, which is defined below. You can also
// manually create your own iframe, this function is just for convenience.
// This example also passes along the kongregate user_id and game_auth_token so
// that the page can use them for authentication.
// var params = “kongregate_user_id=” + kongregate.services.getUserId() +
// “&kongregate_game_auth_token=” + kongregate.services.getGameAuthToken();
kongregateAPI.embedFrame(“game.html?” + params);
}
// Begin the process of loading the Kongregate API:
kongregateAPI.loadAPI(onLoadCompleted);
|