This implementation is taken from TrainLord as it runs on web (flash), android and iOS (AIR) platforms. Facebook’s authentication flows are based on the OAuth 2.0 protocol. Its recommended you have general undesrtanding of OAuth protocol prior reading this article.
If you run services on your own backend (like TrainLord does), the main point of whole thing is to securely pair a facebook id and user session. So later, whenever user does a request to your backend it automatically recoginzes the facebook id. In my case I used id and name to create an unique user record in my database so I can save some more user related data (score, etc.).
Few times per year I need to upload some AIR apps into apple app store. As I am not doing it regularly, I keep forgetting the necessary steps and it takes noticeable amount of time to figure out all the glitches that I keep hitting. I will try to keep this post actual at least regarding to my own app store experience.
6 months before today I released and open sourced YCanvas library. Since it powers some of my projects nicely (onBoard, Train Lord), some of you requested me to create map implementation as well as Feathers UI component so you can easily integrate it into your own projects. I have decided to take this challenge and wrapped the original library by some more specific functionality. It took me some time, but finally, the extended library is out and ready to be used in any flash, AIR or mobile project.
In case you have not yet started with haxe macros (The Haxe macro system allows powerful compile-time code-generation without modifying the Haxe syntax.), you may find it difficult to implement something like inline constants you were used in your flash projects. Lets imagine you just want to “embed” a version number of your app right into the app and access it at a runtime, or you want to show a build date. In Haxe you have the option to use macros for this purpose, and this would be just a tiny piece of iceberg macros let you do. Here is a simple example how to do that.
If you wonder if there is a way to run or debug your LG Smart TV application outside of LG IDE, lets say from command line (or Ant), I have some good news for you. It took me some time to discover the necessary requirements but thanks to WMIC and some luck I was able to run and debug the app in emulator with the web inspector.
Requirement for this process is to have LG SDK/IDE including Emulator properly installed. Natively LG IDE (eclipse) handles the process of running or debugging the app in emulator pretty smooth. Once you click run or debug button the eclipse starts local server listening on port 8080 (root is c:/*ECLIPSE-WORKSPACE*/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/*PROJECT*/), starts Safari (installed with LG SDK) within a debug perspective and opens an emulator…
Next step with my project was to implement MVC framework. The most popular one called mmvc provided by massive interactive seemed a bit broken when used with HaXe 3 RC, but as all those sources are available, I managed to do some small updates in order to compile it without errors. Normaly you would just install the mmvc library using haxelib and the install process grabs the necessary dependencies like msignal, minject, mcover, mcore… But in order to fix HaXe 3 issues, I decided to just download it into my projects src folder.
Today I continued to progress on my Samsung Smart TV project with unit test implementation. My aim is to prepare smooth process for automated builds. First, I tought I would struggle with it much more but at the end it appeared that necessary tools already exists.
It may be a little tricky to setup “Native Android App” section for your Facebook application. Especially the field “Key Hashes”. Facebook provides instructions for acquiring debug version hash but is not very clear about how to get one for signed application. There is a lot of valid answers around the internet, but the one I needed was still missing. Imagine this simple scenario where you export and sign (using .p12 cert) your AIR Android project, you have an .apk file and want to get a key hash for facebook. Then I finally found the answer: