
Share Your Code
Browse Code
- All (907)
-
(94)
-
(85)
-
(44)
-
(4)
-
(42)
-
(137)
-
(21)
-
(41)
-
(13)
-
(65)
-
(151)
-
(210)
Parse for Corona SDK
This sample project shows how to communicate with Parse.com, a back-end data service, from a Corona SDK app. You should be able to adapt it to your needs with minimal changes. See main.lua for a barebones UI.
To use the parse.lua module, add:
1 | local Parse = require("parse") |
to your main project file and refer to functions as shown in main.lua.
You'll want to use SDK build 2012.782 or later, for support of HTTP methods PUT and DELETE.
http://blog.anscamobile.com/2012/04/storyboard-network-changes-and-more/
See the Parse API for details:
https://www.parse.com/docs/rest#general
Replies
Good stuff!
Awesome. Thanks!
I was working on this also (replacing my current S3 and SimpleDB backend with a Parse backend).
My app only authenticates via Facebook, and to do that with Parse you need the token and expiration from the FB login. Corona only provides the token. I filed a feature request tonight to add the expiration (in the same place they provide the token - in the callback from login).
It's probably a 5 minute fix for them. But who knows how their prioritizing system works.
thanks
hey bob, just wondering if you could point me out the best way to get the date in YYYY-MM-DDTHH:MM:SS.MMMZ format with millisecond precision from event.expiration ? thanks in advance
The expiration did get implemented by the Corona folks. I had some back and forth with Walter and a guy from Parse (David Poll) with respect to the granularity of the expiration. Walter explained that all they got from the FB API was a unix time (without the granularity implied by the Parse API spec).
David from Parse said "We use the token expiration as part of our validation of the token. You should be able to send us the unix time converted into the format described on the REST API page."
So you don't need to worry about the precision, you just need to convert/format the provided expiration time per the Parse spec.
I actually put my Parse work on the back burner, so I haven't gotten to this yet. I'm hoping to get back to in within a week or two.
Thanks!
Did you get create object working?





Thanks a lot!