This section will show you how to create Facebook Apps that integrate with the The Facebook Platform.
Here's a basic hello-world program that displays inside a facebook "canvas".
The first time you preview a Facebook app in the AppJet IDE, it will present a wizard for helping to configure your app integration with Facebook.
The facebook library creates the global object fb
which contains some information about the current user of the Facebook
app.
Facebook users are identified by their "UID" (User ID), which is an integer.
The variable fb.friends contains an
array of uids for the current user's friends.
The function fb.call lets you make calls to the
Facebook
API. Here
is a list of all the API calls facebook supports.
Here is an example using fb.call to
list the user's friends who have birthdays in the current month.
Note that we used the function FB_PROFILE_PIC to
render a special kind of display. This is an example of what Facebook
calls "FBML", the FaceBook Markup Language. FBML is like an extension
of HTML, and you can use FBML tags in AppJet the same way you use HTML
tags.
Here is an example that allows a user to put some
text in a box on their Facebook profile
using fb.setProfileFBML().
Here are some additional example facebook apps to help you get started.