Sunday, 19 May 2013

Facebook authorization

The more I read the management book the more I realize it's witchcraft. Also it seems we're 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 don't tell anybody the truth. Just like in Ibsen's 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 couldn't 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. I've tried them all, seriously and got nothing back. Some part of the code wasn't 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 I'm using with the app. In the Web app section of the app config page. Tada.wav, everything works perfectly. I think I'm just the best guy on Earth to screw this up at the most subtle point. Anyways, it's 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.

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



No comments:

Post a Comment

Note: only a member of this blog may post a comment.