Reputation: 1482
Parse.initialize(ApiKeys.appId, ApiKeys.jsKey, ApiKeys.masterKey);
function submit(){
var GameScore = Parse.Object.extend("GameScore");
var gameScore = new GameScore();
gameScore.save({
score: 1337,
playerName: "Sean Plott",
cheatMode: false
}, {
success: function(gameScore) {
// The object was saved successfully.
debug_log("score success");
},
error: function(gameScore, error) {
// The save failed.
// error is a Parse.Error with an error code and message.
debug_log("score error");
}
});
}
I am sure that I have already config the keys. But I still cannot save, everytime, when I submit
, it give me back error.
I use back{4}app instead of parse, is there something important was ignored by me?
Thanks in advance.
Upvotes: 1
Views: 120
Reputation: 970
You should provide the error code and its message.
The code seems ok, check your keys and settings.
Check the error message
not authorized=> keys not matched.
something like you are without permission to XXX=> check the class level permission (CLP)
or you have the beforeSave on cloud code, check response.success() have been called.
Upvotes: 2