Hmm, i do have that init function and the call is wrapped inside it. I’m wondering if I’m not handling the login and redirect correctly. Maybe I’m not putting things in the right order? Anyhow, here is the full section of code for when the app starts up:
window.idAsyncInit = function() {
// When SDK is ready and when id.init event is triggered (all initialization processes are done i.e. ID.init called)
// We register an event with jQuery
// on click on the connect link it will open the ID.net authentication modal window
ID.Event.subscribe('id.init', function(){
$('#idnet-connect').on('click', function(){
ID.register();
});
ID.GameAPI.init('MY APP ID THAT I FOUND ON DASHBOARD', null, function(data, response){
console.log(data);
$('#achlist').click(function(){
console.log("achlist");
ID.GameAPI.Achievements.list();
});
$('#achsave').click(function(){
console.log("achsave");
console.log(data);
console.log(response);
var achievement = {
achievement: "TEST",
achievementkey: "UNLOCK KEY FROM DASHBOARD"
};
ID.GameAPI.Achievements.save(achievement, function(data){
console.log(data);
});
});
});
});
// init the ID JS SDK
ID.init({
appId : 'MY APP ID THAT I FOUND ON DASHBOARD', // App ID from the app dashboard
status : true, // Check Id.net Login status
responseType : 'code', // 'token' by default
redirectUri : 'https://localhost:4443' // default redirect_uri
});
};
and @martin, yes i did check the app console’s hitcounter and it is still zeros everywhere.