Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

A Parse.com Module for Corona SDK
Started by Develephant Dec 08 2013 07:24 PM

* * * * * 1 votes
85 replies to this topic
[TOPIC CONTROLS]
Page 3 of 4 1 2 3 4
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#51

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,280 posts
  • Corona SDK

Thank you for the module. 



[TOPIC: post.html]
#52

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,280 posts
  • Corona SDK

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>"
}



[TOPIC: post.html]
#53

BiL-ink

[GLOBAL: userInfoPane.html]
BiL-ink
  • Observer

  • 5 posts
  • 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! :)

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


[TOPIC: post.html]
#54

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

Hi,

 

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

 

Thanks!



[TOPIC: post.html]
#55

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

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.



[TOPIC: post.html]
#56

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,280 posts
  • Corona SDK

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



[TOPIC: post.html]
#57

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,280 posts
  • Corona SDK

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


[TOPIC: post.html]
#58

BiL-ink

[GLOBAL: userInfoPane.html]
BiL-ink
  • Observer

  • 5 posts
  • Corona SDK

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! :D



[TOPIC: post.html]
#59

keithholler13

[GLOBAL: userInfoPane.html]
keithholler13
  • Observer

  • 16 posts
  • Corona SDK

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]: ?
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>


[TOPIC: post.html]
#60

Robert Burns

[GLOBAL: userInfoPane.html]
Robert Burns
  • Enthusiast

  • 79 posts
  • Corona SDK

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.



[TOPIC: post.html]
#61

joel.eya

[GLOBAL: userInfoPane.html]
joel.eya
  • Observer

  • 5 posts
  • Corona SDK

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:

[C]: ?

/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.



[TOPIC: post.html]
#62

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

Hi,

 

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

 

Hopefully that will finally solve the issue.

 

Cheers.



[TOPIC: post.html]
#63

zaviermars

[GLOBAL: userInfoPane.html]
zaviermars
  • Observer

  • 17 posts
  • Enterprise

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.



[TOPIC: post.html]
#64

Nathan B

[GLOBAL: userInfoPane.html]
Nathan B
  • Contributor

  • 173 posts
  • Corona SDK

First of all, Develephant, you are my favorite elephant. That is high regard. ;)

 

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



[TOPIC: post.html]
#65

Orphin Softwares LLC

[GLOBAL: userInfoPane.html]
Orphin Softwares LLC
  • Observer

  • 6 posts
  • Corona SDK

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



[TOPIC: post.html]
#66

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

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.



[TOPIC: post.html]
#67

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,280 posts
  • Corona SDK

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.



[TOPIC: post.html]
#68

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

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.



[TOPIC: post.html]
#69

Orphin Softwares LLC

[GLOBAL: userInfoPane.html]
Orphin Softwares LLC
  • Observer

  • 6 posts
  • Corona SDK

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



[TOPIC: post.html]
#70

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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



[TOPIC: post.html]
#71

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

@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.



[TOPIC: post.html]
#72

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

@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.

Not only am I working on the upcoming Parse 2 :) , 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?

[TOPIC: post.html]
#73

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • 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.



[TOPIC: post.html]
#74

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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 :)

[TOPIC: post.html]
#75

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,457 posts
  • Corona SDK

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.




[topic_controls]
Page 3 of 4 1 2 3 4
 
[/topic_controls]