Discussion Forums  >  Suggestions, Ideas, Wish List

Replies: 5    Views: 394

AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
04/15/16 10:40 AM (8 years ago)

Login and json problem - any ideas?

I have somebody who is asking me to build an app, which would have to login to their server, using http get. The thing I am stuck on is that they provide a json response of {} for unsuccessfull login, or a whole load of json stuff with a successful login. I don't know how to approach this. I was thinking od doing it in html, but so far I haven't been able to. Or maybe modify the login plugin? For starters, I just want to be able to achieve a successful logon. Part two would be to process and store the returned json as variables. Any ideas anyone? Any and all suggestions gratefully received.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
04/15/16 11:45 AM (8 years ago)
There are several ways to approaching this. 1) Do it yourself. Study the Beautiful Login plugin by Chris1 and there you will see how he solved JSON, PHP, databases and the like. 2) Hope to find someone here in the forums that will help you along the way. My post here: http://duskosavic.com/blog/programming/a-full-circle-from-menu-simple-to-php-to-json-to-menu-simple-again/ is one small part of the puzzle, and there are other documents, like this one: https://www.buzztouch.com/files/howtos/Posting_Current_Location_to_a_Database_v1.0.pdf 3) Pay for a professional solution. Actually, your customer pays for that. See if you can raise the price so that you can pay the developer and still make some profit overall.
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
04/15/16 04:43 PM (8 years ago)
I would be able to help you solve this programming problem either natively within iOS or in HTML/CSS/JavaScript. If you are interested, please feel free to email me at support 'at' jakechasanapps.com Thanks, Jake
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/16/16 08:10 AM (8 years ago)
Thanks Jake & Dusko. I enjoy the challenge and will try a bit longer. Thanks for the tips Dusko, I will look at them. I have days when things click, yesterday was a day of no clicks. If I cannot work out how to do this, I will certainly reach out for a professional solution and factor in the cost. I don't have Beautiful Login plugin by Chris1, and I may have missed somethingin his description (and video) - Dusko, are you saying it would capture & store returned json?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
04/16/16 08:32 AM (8 years ago)
>Dusko, are you saying it would capture & store returned json? Yes, it will. And save it as a file.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/29/16 01:17 AM (7 years ago)
Thanks for all the tips guys. Eventually I was able to pull together a solution using html/jquery/ajax. I wasn't able to make the Beautiful Login plugin by Chris1 work out of the box (I'd need to spend a lot more time with it to find out why). I switched to the html route and had that running after a day or two of trial and error. When working with a 3rd party it is an easier way to compare notes. I was unable to see how the Beautiful login stored json (although I did find the point at which variables are returned), however I achieved that using html5 localstorage. I am more comfortable with javascript and I'm hoping this approach will work for Android too. Fingers crossed!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.