Brian Zhang Larsen’s Blog

My first Facebook app

I more or less just finished my first facebook app. It is an electronic version of Chinese flashcards, with some testing and scoring functionality. It started as a mix of my interest in learning the Chinese characters, and trying out the facebook developer framework.

As a facebook developer, you have the choice of writing your application as a canvas page which is embedded parsed html, returned from your script, or as an iframe. Though you have more freedom on the iframe page, you can’t really make use of the specific functions provided by the facebook framework, so the right choice would be to use the canvas page. The framework is pretty well thought of, even though it has its shortcomings. For security reasons and to generally prevent mess-ups, facebook provides their own version of javascript, called FBJS. Even though it is a serious pruned down version of JS, it does the trick.

I used the CEDICT database, for the Chinese words, and sorted them into difficulty categories according to their natural frequency. This does not necessarily reflect the number of strokes, which also can be a sign of difficulty. While not everybody has the Chinese language pack installed, I had to generate images of all the characters, and their pinyin representatives. I haven’t yet found the optimal font for generating pinyin images, so some of the representations can look a bit off.

Chinese Flashcards

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.