title: Parse server cloud code getting and updating an object
body: <p>When a user shares a post I want to be able to give them a reward point for doing so. I am calling the cloud function from xcode like this.</p>
  
  <pre><code>PFCloud.callFunction(inBackground: "shares", withParameters: ["objectID" : "z2pU3UDFrh"])
  </code></pre>
  
  <p>I hardcoded an object id for now just to check if its working. 
  Here is my cloud code function that gets called </p>
  
  <pre><code>  Parse.Cloud.define("shares", function(request, response) {
  
      var shareQuery = new Parse.Query("Parse.POSTS");
      shareQuery.get(request.params.objectID, {
        success: function(object) {
          console.log(object)
          object.increment("score");
          object.save();
        },
        error: function(error) { },
        useMasterKey: true
      });
  
    });
  </code></pre>
  
  <p>when I check the logs it prints  "undefined" and the score remains unchanged </p>