A Parse.com Module for Corona SDK

Hi all,

A new, well worked over, version of mod_parse is now available at 2.2.3.  Hopefully this should solve the outstanding issues.  Any testers appreciated. Please read over the release notes to see what has changed.

Android push is still coming.  I need to set up my phone for testing.

mod_parse 2.2.3 release notes

http://develephant.github.io/mod_parse/

Cheers.

Awesome :slight_smile:

The mod_parse module has been updated to fix some critical issues.  Thanks reporters!

I’ve also put together a quick recipe on how you login, upload a file, and link it to the record on Parse. It demonstrates some best practices for using mod_parse.

Please report any issues to the tracker.

Cheers.

Hi develephant,

You work is amazing. We are using your mod_Parse and we would like to send you money for this as we know dong work like this require many, many hours of hard work. What is the process please ?

Nick

Hi,

Thank you for the kind comments.  mod_parse has been around for a year and a half now, so yes, many hours. :slight_smile:  I’m thrilled it’s working for your needs.

Your offer of a donation towards the work is very gracious of you.  Feel free to use the coronium.io PayPal page. If you’d prefer another method, go ahead and PM me.

Thank you so much, and look out for the mod_parse 2 beta. :wink:

Cheers.

Hi Develephant, 

thank you for this amazing hard work, you moved from a lower place as developer to an upper one, thank so much for this.

I still have one problem if you don’t mind. I cannot check if session has expired or not, because obviously the function doesn’t work, and I get error that says :

File: mod_parse.lua

Line: 568

User must be logged in first, sessionToken cannot be nil.

my code is :

[lua]

local parse = require(“mod_parse”)

parse:init({

appId = “…”,

apiKey = “…”

})

parse.showStatus = true

–count event

–parse:appOpened()

–parse:logEvent( “Share”, { [“screen”] = “splash” } )

–parse:logEvent( “Share”, { [“screen”] = “results” } )

local function onCreateUser( event )

  print( event.response.createdAt )

  print( event.response.sessionToken )

end

local userData = { [“username”] = “Ali”, [“password”] = “121212” }

– parse:createUser( userData, onCreateUser )

local function onLoginUser( event )

  if not event.error then

    print( event.response.objectId )

    --check if user is verified

    if event.response.emailVerified then

      --user is verified

    end

  end

end

parse:loginUser( { [“username”] = “Ali”, [“password”] = “121212” }, onLoginUser )

local function onGetMe( event )

  if event.code == parse.EXPIRED then

    print( “Session expired.  Log in.”)

  else

    print( “Hello”, event.response.username )

  end

end

parse:getMe( onGetMe )

[/lua]

I want to know how to fix this and continue learning about your great _mod.

thanks.

Thanks for the labor, develephant! Everything is working smoothly thus far.

This is a question for anyone:

I have an array-type column on Parse.com. Say, for example, I just want to update the second index in that array. If it’s even possible, how do I do that using mod_parse?

Thanks,

Nathan

I love the parse mod thank for making it. :grinning:

Our team is new to Corona, just have a quick question we are getting the error below when we try to insert and get Objects, but we are able to insert. 

Super thanks in advance :slight_smile:

 Runtime error

/Users/joeleya/Desktop/parse/mod_parse.lua:881: attempt to concatenate global ‘err’ (a table value)

stack traceback:

/Users/joeleya/Desktop/parse/mod_parse.lua:881: in function ‘onResponse’

/Users/joeleya/Desktop/parse/mod_parse.lua:772: in function </Users/joeleya/Desktop/parse/mod_parse.lua:772>

May 20 00:22:59.058: Runtime error

/Users/joeleya/Desktop/parse/mod_parse.lua:881: attempt to concatenate global ‘err’ (a table value)

stack traceback:

/Users/joeleya/Desktop/parse/mod_parse.lua:881: in function ‘onResponse’

/Users/joeleya/Desktop/parse/mod_parse.lua:772: in function </Users/joeleya/Desktop/parse/mod_parse.lua:772>

Thank you for the module. 

I am also getting an error of all things json.decode. This is an example of a response that returns an error inside the mod_parse as invalid response. It is valid json according to two online validators. Also if I run this same string through json.decode any place else in the code it works. Any help would be appreciated.

{  
   “authData”:{  
      “facebook”:{  
         “access_token”:"<myAccessToken>",
         “expiration_date”:“2015-07-20T03:20:49.000Z”,
         “id”:"<myId>"
      }
   },
   “createdAt”:“2015-05-21T03:20:55.697Z”,
   “objectId”:“FLPwNVUndI”,
   “sessionToken”:“r:<sessiontoken>”,
   “updatedAt”:“2015-05-21T18:36:05.180Z”,
   “username”:"<myUsername>"
}

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:

Hey develephant,

What should we expect for mod_parse 2 and do you have a time frame for your beta ?

thank you

Nick

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.