Facebook App, ChatWithFriends

I developed facebook app, ChatWithFriends, after I studied Facebook Application Development at UC Santa Cruz Extension.

This is a simple chat on which you can chat with your multiple friends.

You can chat with your multiple friends!

In terms of Facebook Application Development, I thought it is a little difficult to develop. So, I pick up some issues on which I was confusing.

First is the usage of SetInnerFBML function in FBJS. When you want to insert FBML into HTML content dynamically, you have to use SetInnerFBML. However, You can not make FBML dynamically in FBJS. This means that you have to prepare static FBML tag or get FBML via Ajax from server side.

Sample FBJS:

var ajaxObj = new Ajax();
ajaxObj.responseType = Ajax.FBML;
ajaxObj.ondone = function(data){
document.getElementById(‘chat-area’).setInnerFBML(data);
};
var queryParams = {‘aaa’ : aaa};
ajaxObj.post(‘http://sampleserver.com/sampleProgram’, queryParams);

Second is a Redirect. Even if you want to redirect in PHP program, header() function doesn’t work in Facebook canvas. So, you have to output <fb:redirect url=”redirectURL” /> instead of call header(). (But, I don’t think this is the best way. If you know better way, please let me know it!)

Anyway, Facebook App Development is interesting!

6 responses to “Facebook App, ChatWithFriends

  1. Antony 'hihia' Halim

    hey i’m from indonesia, and i’m a student now. i have interest for developing facebook application.. do you have some recommended source or ebook i can use as references? if possible, i want to developing this application using zend framework.. thx for your help..

  2. Hi Antony,

    I think the best reference is Facebook Developer’s page because Facebook Framework is improving and adding new features at all times. You can find sample codes, libraris for PHP and forum in the pages. Forum is very useful because in most cases, someone has trouble with same issues as you have.

    In terms of books, Essential Facebook Development published in Nov 2009 is better among books to learn from scratch.

    In terms of Zend, I am not familiar with Zend, but the followings may be useful:
    http://blog.madarco.net/91/build-a-facebook-application-with-zend-framework/
    http://zendguru.wordpress.com/2009/05/31/zend-framework-and-facebook-writing-a-simple-facebook-application-in-zend-framework/

    Good luck!

  3. hey nishy, thank you very much.
    I once have visited the Madarco blog and the tutorial isn’t very clear. I will try the zendguru blog. And thanks for the reference book too nishy.

    I will try to read the book first.😀

    If you don’t mind I will stopping by in your blog to ask some question if I have a problem. 😀

    I have just tried your application. It’s pretty cool man.😀

  4. Pingback: Kupas Tuntas Facebook Sebagai Situs Social Networking Terbesar Di Dunia « Antony 'Hihia' Halim – Logging Everything in The World

  5. sob…. linknya udah dipasang di blog aku ayead.blogspot.com BLOGNYA ANAK GAPTEK

    thanks . n lam kenal yaaaa!!!! sob

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s