Posting some "news feed" like what Facebook and Twitter does

Hi all,

I’ve been using Corona for some time, and now I’m working on an app that basically allow users to sign up and post some “news feed” like what Facebook and Twitter does.

Up till this stage, I’ve read through many many articles about XAMPP, Php, MySQL, SQLite and Parse. Parse helped me to integrate my sign up and sign in option, but I still can’t figure out how to post “news feed” for everyone to view.

I’m using composer view. I need to let my users to key in something, say, their mood of the day (“I’m sad today”). Then that string will be stored in my database, and when anyone refreshes that page, my app would fetch those data into that page, so everyone that uses my app can see it.

My problems are:

  1.   I assume that I need to use network.request() for this to work, but do I need a web domain of mine first? Otherwise, how should I make those data accessible by everyone, but not editable by them?

  2.   I could construct a SQLite .db file (thanks to Rob’s tutorial), but how can I make everybody able to insert string table into it? A remote database maybe?

  3.   How to retrieve all data of that .db file upon refresh?

Thanks for any kind soul to help out!

Ming

These tutorials should get you going in the right direction:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

https://coronalabs.com/blog/2015/06/02/tutorial-connecting-to-restful-api-services/

Rob

Okay thanks, I’ll look through it and see what can I get from those :smiley:

mingdei93: Set up your “news feed” API separately from your app. Think about security. Write some automated tests for it. Then integrate it with your app.

Where to host it? Well, there are innumerable options, most of which involve your own domain. A low-cost way might be a $10/month Linode instance, PHP, and a MySQL backend (or even flat files). A more robust and scalable approach, albeit with more initial overhead, would be Google App Engine with Python, which is what I use.

These tutorials should get you going in the right direction:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

https://coronalabs.com/blog/2015/06/02/tutorial-connecting-to-restful-api-services/

Rob

Okay thanks, I’ll look through it and see what can I get from those :smiley:

mingdei93: Set up your “news feed” API separately from your app. Think about security. Write some automated tests for it. Then integrate it with your app.

Where to host it? Well, there are innumerable options, most of which involve your own domain. A low-cost way might be a $10/month Linode instance, PHP, and a MySQL backend (or even flat files). A more robust and scalable approach, albeit with more initial overhead, would be Google App Engine with Python, which is what I use.