Friday, July 27, 2018

Facebook authorization

Facebook authorization



The more I read the management book the more I realize its witchcraft. Also it seems were all dumb chickens waiting for managers to tell us how to live and die. We cannot deal with stress, emotion, challenge or basically any real life situation. Only revealing fact is that managers dont tell anybody the truth. Just like in Ibsens Wild Duck, we keep our naive happy life.


It was deep day. Facebook went to my nerve and kicked me on my balls. As explained yesterday, I need the JavaScript API to log the user in through their service. It went all fine, except one thing, I couldnt access to any data. I need the user info and the friend list (later, to detect connections in the game). For some reason it was always complaining that it needs the authorization token. Was a bit surprising that there is no straight answer or tutorial how to obtain it. Some said it goes through login. Or there is a separate function. Ive tried them all, seriously and got nothing back. Some part of the code wasnt even called. After cooling my head down around Regents park I noticed a weird error. "URL is not defined." Was? Turned out, I need to define at least one URL Im using with the app. In the Web app section of the app config page. Tada.wav, everything works perfectly. I think Im just the best guy on Earth to screw this up at the most subtle point. Anyways, its working now. Lesson learned, RTFM at least 12 times.

Then refactored a little bit of the mongo db helper extension. Setting up a config file. The next phase is gonna be the backbone infrastructure. The public repo is here, if you want a quick peek.

Im wondering if I should start using my Soundcloud account to upload my ideas. I may do some experiments this week.

---

Peter

go to link download