Saturday 15 June 2013

parse.com - Increment Likes in Objective-C / Parse Cloud Code -


I am creating a social app using Objective-C and Pars. I'm trying to write cloud code for choice on the edge of a button click (which is part of the secure user class). It's like me now:

Cloud code < / P>

  pars.cloud.define ("looking for increment", function (request, response) {parse.Cloud.useMasterKey (); var user = new parse.object ("user"); User.userName = request.params.userName; user.increment ("Profile Picture");});   

In-background: with parameter "@ increment choice": @ {@ "userName": self.user.username}]; }

self.user is PFUser whose profile is being viewed.

This code generates the following error, and does not increase the liking:

<(code: 141, version 1.6.2)

OK, the error is because you are not calling the response handler in the cloud code, but you have several other problems:

  1. Not calling answer
  2. Passing user name instead of user's object ID
  3. Do not save the user it's update After T

No comments:

Post a Comment