Computer Science student, web professional

Archive for May, 2011

Translate Facebook Comment from English to Romanian

Utilizing Facebook’s ui method ( has been a great success. I established a page that had a input textarea to make one’s comment in English. Then I did a GET action for the form, to pass the textarea’s value to the url. Once the value was passed, I had envisioned the page grabbing that value, posting it to facebook and then doing the translation. With the translation done, then it would do another post.

The Project In Review

I encountered some issues with deciding what type of technology to use and what process actually worked using the Google translation api and the Facebook’s UI method.

google's code logo

I decided upon using PHP with HTML and JavaScript. I found it quite easy to pass the data from the text area to the URL in this fashion. What I found difficult was how to do the translation and when. I attempted to do it first on the page that I passed the value to. Unfortunately, this was causing a bit of a cumberson nature of use for the user. I stepped-back at this point to re-evaluate the project and how I would want to use this as a user. I wanted to be able to input the facebook status (comment) and click post, and it would go to Facebook. I decided to move the translation to the initial page as well.

The Translation Revamp

I decided that if I was going to do a translation on the same page as the input area, I didn’t want the user to have click excessively. As a result, I decided to implement an onchange javascript call to a function that would do the translation. Then with this, Google’s api has a callback feature. With the callback feature, I was able to reassign the value of an HTML’s element. I updated a hidden translation input field for the form. With this done, I was then able to easily pass the value’s of the english input textarea and the hidden tranlsation element to the URL. On the receiving page, I pulled the data from the URL via PHP and passed the value to the Facebook’s UI. It functions sort of like this:

User input -> click post -> popup for translated post -> user click post or skip -> popup for english post -> user click post or skip

Analysis of Project

I believe that I’m going to work on implementing it a bit differently. If I combine the english & the translated text, I feel this would be easier for the user.If the user decided they didn’t want to include the translated piece then they could delete it. This is more difficult than just clicking skip, but on the flip-side it is much faster than clicking post twice. In addition to this, the wall would not have two posts, but one single one, which will result in a ‘cleaner’ wall. Next steps: modifications to the application and attempting to incorporate it into Facebook’s canvas (

Auto-Translate Post 


Facebook’s Connect Plug-in

I have decided to go with Facebook. Considering the time restraint for my class and the scope of my project that I desire to complete (and be successful at).

I was able to implement the Facebook’s Connect Plug-in which has one specifically for the commenting.

Facebook has it so that you are utilizing xml type of coding in order to implement it. This makes it REALLY easy for developers and non-developers, a like, to get a comment thread going on one’s side or page. This doesn’t lend to easy implementation of auto-filling that comment box, or updating it with comment dynamically.

I dug further in to the tunnels of Facebook API and into how other users are tieing in the commenting feature for facebook onto their sites. This is where I tripped about a feed feature from a Facebook method called FB.ui. What a great resource! It was easy to implement and has helped me to start working on combining a user’s input into the posting on Facebook.

American & Romanian Flag
American & Romanian Flag Blended Image

Next I am going to approach doing the double post: one in english (my native language) and one in romanian (my desired posting language). You may take a preview at a very rudamentary version, although it may break and work break and work as I continue to update the code and implement to new features (cross my fingers).

Developing an app on Facebook


I'm using Google's API for it's translationI thought this was going to be a simple process to get started and would have the hiccups when I start to try to incorporate google api with facebook api. To my surprise, it is starting with Facebook. I feel as if they tell you to you the canvas, but not exactly why. I tend to understand when I understand why. If a reader of this blog is familiar with the canvas and usage of it, please let me know! So far, I understand that I need to develop the application and host it on my own site. Through the iframe on Facebook, it pulls that page and displays the content.

Another question, with Facebook, am I required to have the url under a SSL? I don’t know, there is a space for the secure canvas url, but it doesn’t appear to be required.

I feel frustrated and bit like I’m in the mud at this moment. I hope to update this blog at the end of the week or w/in a week maybe with some answers to my big QuEsTiOnS. 😛


UPDATE: After researching various methods of utilizing facebook api, google api, and phython, I have established a plan of action. I am working with the google api to do a translation on a page ( The next step is I’ll incorporate facebook’s ability to post a status from an external site ( I’ll then try to take this application and incorporate it into Facebook’s canvas. Lastly, I’ll review my implementation and see if I can move it over into python language. Currently, I’ve been working with JavaScript and PHP.

Developing on Android

Image of Android logo dudeI will be working with java on android platform this summer for an internship. I have academia experience in java, but no experience developing for android. What do I do first? Of course, a google search. As it turns out, I forgot that android was developed by Google support. The first suprising thing that I’ve learned is that you can’t run java bytecode on Android. !?WHAT?! I thought Android was on a Linux platform with Java interface. I must dig deeper. The virtual machine Android runs is Dalvik Virtual Machine which has its own bytecode and Java is translated by Android’s tool ‘dx.’ 


I’d like to use eclipse as my development environment, because I’m I’m familiar with this IDE. Google provides the Android Development Tools (ADT) that you install with Eclipse, which converts the java compiled file ‘class’ type to ‘dex’ type.

Interestingly I forgot how heavy grphics are used in Android and read that it supports 2d and 3d graphics from the OpenGL library and uses SQLite for data management. In my project, they highlighted SQL so I’m not sure how the conversion goes from SQLite to SQL. I’ll have to take a peak at this as well. *doink*


I’ll be looking at various resources online. One is, which has babsically provided the majority of the information above. The SDK for Eclipse is available at:  The last resource that I think is vital is that first walk through is how to do your first project in Eclipse. Here is a resource for that:

Tag Cloud