A Parse.com Module for Corona SDK

Hi, everyone!

I am having a Parse problem as well. Even though Parse Facebook login works just fine and everything I wanted is shown on Parse online, I just can not get Parse objectId. Well, I can not get any kind of response in callbacks. Problem occurred in one of the very first lines of the code when nothing happened on “parse.showStatus = true” command. Down is the code I tried to use to get objectId through onLoginUser callback. Help please! :slight_smile:

function onLoginUser( event ) print( "objectID:", event.response.objectId ) end local userData = { ["authData"] = authData, ["username"] = fbName } parse:loginUser(userData, onLoginUser)

Hi,

Is there a version number near the the top of the mod_parse module?  And if so, what is it?

Thanks!

Hi,

Please try the latest mod update (2.0.2) to see if it changes anything.

https://github.com/develephant/mod_parse/archive/master.zip

Let me know.

Version 2.0.2 works great. Not sure what you changed but thank you!

Blink mine works but looks completly different than what you are doing. Not sure if that is causing the issue but here is my code:

local function onLoginUser( event ) print("----- Object Id: "..event.response.objectId ) end local function doParseLogin( fb\_user\_id, fb\_session\_token, fb\_session\_expiry ) print("Logging into Facebook.") local authData = { ["facebook"] = { ["id"] = tostring( fb\_user\_id ), ["access\_token"] = tostring( fb\_session\_token ), ["expiration\_date"] = parse:timestampToISODate( fb\_session\_expiry ) } } parse:loginUser( { authData = authData }, onLoginUser ) end

Hi, @develephant !
I was using version 2.0.1, now I’ve downloaded 2.0.2 and everything works great! I am getting all the data I wanted in callbacks and have no problems anymore. Once again, thank you for your quick response!

Hi @agramonte !
The code you are using is pretty much the same as the one I am using, I’ve just set authData and fbName earlier, but thanks for you help!

Cheers! :smiley:

I am currently using version 2.02 but I am still getting the same error that people were getting in 2.01 we followed all your steps for your tracking user score video. 

Runtime error

c:\users\keithandkaylee\documents\corona projects\server testing\main.lua:16: attempt to index field ‘response’ (a nil value)

stack traceback:

c:\users\keithandkaylee\documents\corona projects\server testing\main.lua:16: in function ‘_callback’

c:\users\keithandkaylee\documents\corona projects\server testing\mod_parse.lua:972: in function ‘onResponse’

c:\users\keithandkaylee\documents\corona projects\server testing\mod_parse.lua:773: in function <c:\users\keithandkaylee\documents\corona projects\server testing\mod_parse.lua:773>

I just started using Parse myself, using your module. So far it is absolutely wonderful except for the error that Keith stated above. I’ve been following your tutorials, and no matter what adjustments I do, I get that error posted above. I would like to use parse for storing the players game data, but this error is keeping me from doing that. No data I try to receive comes through. I can only send.

Thanks for all the effort you’ve put into Parse and Coronium so far. Both are great.

Hello 1st again thank you so much for this module:

Same problem here already downloaded 2.0.2

/Users/joeleya/Google Drive/PFA App/The App/Inquire.lua:232: attempt to index field ‘response’ (a nil value)

stack traceback:

/Users/joeleya/Google Drive/PFA App/The App/Inquire.lua:232: in function ‘_callback’

/Users/joeleya/Google Drive/PFA App/The App/mod_parse.lua:972: in function ‘onResponse’

/Users/joeleya/Google Drive/PFA App/The App/mod_parse.lua:773: in function </Users/joeleya/Google Drive/PFA App/The App/mod_parse.lua:773>

 

Thank you so much in advance.

Hi,

Please try the latest version 2.0.3 here https://github.com/develephant/mod_parse

Hopefully that will finally solve the issue.

Cheers.

Hi @develephant,  hope this thread is still going good yeah.

I need some advice, how good is parse currently (in addition to all the mod_parse that you’ve done and updated till now), is it able to be used for Real-time Mobile MOBA game app? lets say 4v4 maximum players in a match.

Warm Regards.

First of all, Develephant, you are my favorite elephant. That is high regard. :wink:

Okay, here’s why I’m here right now. Sending and receiving data with Parse.com using your module is working wonderfully. However, although that is working, the listeners to the mod_parse functions are not being called. I’ve tried the simplest example, which I pulled from your tutorial (this one).

local parse = require( "mod\_parse" ) parse:init({ appId = "myAppId", apiKey = "myAPIKey" }) parse.showStatus = true parse.showAlert = true parse:appOpened() local function onCreateUser( event ) --nothing in this function is read print( event.response.createdAt ) print( event.response.sessionToken ) print("hi") --extra indicator end local userData = { ["username"] = "Chris", ["password"] = "1234" } parse:createUser( userData, onCreateUser )

I would imagine this is an easy fix (whichever side it’s on). At least, I hope it is.

Thank you,

Nathan

Hey Develephant, 

I just wanted to post here and let you know the latest version 2.1.3 on github seems broken. Any time you try to login, it returns a token errror. At least for me. Registration seems a little wonky as well. It will register accounts and say that the user already exists even though it really doesn’t. The bug was on and off when I tried to create accounts. So it was impossible to recreate the bug unless for whatever reason it decided to. Did you accidently create AI? The registration was successful sometimes, but other times it wasn’t. This also returned an error from the session token. My code did not work at all using 2.1.3, so I reverted back to 2.0.3 and everything works fine right now. Just wanted to give you a heads up.

Thanks

Hi,

Parse has made some pretty major changes recently so I’m in the process of getting the mod current.  I’m surprised people are having issues still with 2.1.3 as it has passed all testing many times.  I’ll keep trying to break it.

@Nathan B - I will double check the event code.  My apologies.

Cheers.

Just adding my 2 cents, i currently have an app in the 3 app markets with version 2.1.3 with no issues. The only thing different in mine from the example above is that I am using Facebook to login.

Thanks for the confirmation agramonte.

There have been some changes to Parse session handling though.  You can try turning these options off if you’re having session issues.

https://www.dropbox.com/s/rkhbh22rubip1l9/2015-07-21_1342.png?dl=0

I’ll be looking into updating to the new system soon.

Cheers.

For users to login I created a custom login scene that utilizes the parse:loginUser function. To be exact, here is my code:

parse:loginUser( { ["username"] = userCode, ["password"] = passCode}, onLoginUser )

Just to make sure I was not going insane I tested it again. It’s still doing the same thing. When I log in with 2.0.3 it works flawlessly. With 2.1.3 I keep getting a error when logging in. User credentials are exactly the same in each case. I took pictures if you want me to post them up. The onLoginUser function is pretty much what you use in your examples with slight changes. The changes don’t impact your parse functions though. Also, in relation to the image from Drop Box you posted, all those settings are turned off in my parse account.

EDIT: I just want to elaborate on how I am calling the parseLogin. I use it in a button event. When the button event is over, meaning I left go of the button, that’s when the parse:loginUser is called.

Thanks

I like the new twitter plugin but is there anyway to use that to sign in with parse?

@scottrules44 - I have not had a chance to look at the Twitter plugin.  You might try pinging the author.

Also, as a general note to all Parse mod users, please report all issues in the tracker at the repo here.

I want nothing more than to solve any errors, but it takes up too much dev time trying to collect issue reports from the develephant.com comments, Twitter, email, PM’s, this forum, etc.  So help me help you, please only report issues on the tracker, other means will (probably) be ignored.  ^_^  An issue report doesn’t have to be anything elaborate.

Thanks again for using mod_parse with Corona SDK!

Cheers.

Cool, android push?, also have you been able to reproduce the event.error bug?