Start a new topic

Data Store

Hi



I have created a collection to store information. However, I am having trouble to send data from my JS code to store in the collection.



Even though, I can test ping Kinvey without any issue, this one is showing me appkey missing error.



var promise1 = Kinvey.DataStore.save('CollectionName', {



body : 'abc',

appKey : 'xyz'

}, {

success: function(response) {

alert('success '+response);

}

});



I am using https://da189i1jfloii.cloudfront.net/js/kinvey-phonegap-1.1.1.min.js.



Any thoughts on what's going on? Any guide on client side on this one? Also how can I check log form Kinvey console?



Thanks

Have you called Kinvey.init somewhere in your code? That is required prior to store information on Kinvey.



See [documentation here](http://devcenter.kinvey.com/phonegap/guides/getting-started#ConfigureYourApp), you’d want to place the `Kinvey.DataStore.save` call inside the `promise.then` function.
I did call the init in index.js function. This is why the ping works fine. Not sure if I need anything else is needed for Collection to work. I added appKey in the code above just to ensure.
Login or Signup to post a comment