python - Function called three times when in facebook? -
I am using the following code to add one to two values, if the user found a course.
def challengeewin (request): UID = 1313693 tempuser = User.objects.get (id = uid) tempuser.challengeswon = tempuser.challengeswon + 1 tempuser.silver = tempuser.silver + 1 tempuser .save () Return HTTPPRESSPassion ()
If I'm working outside of the Facebook Canvas page then it works fine, canvas is replaced with 1 instead of 1 in page 3 . Any ideas?
I think the code you include is not a criminal.
Did you confirm that challengeewin (request);
is not being called 3 times?
Comments
Post a Comment