I really think that you should be readving the developer API's for the facebook site first.
When you get stuck with a particular coding aspect, come back and ask specific questions.
The developer API docs can be found here (Documentation link at top of page);
http://developers.facebook.com/?ref=pf[
^]