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:
- Not calling answer
- Passing user name instead of user's object ID
- Do not save the user it's update After T
No comments:
Post a Comment