i am starting to make an iframe based app for facebook. the standalone web app is ready. only facebook integration is left. i looked over things in the docs and learned that i can use XFBML tags only. but when i tried using them, it didnt work. can someone tell me how to use the XFBML tags. also is there any doctype mod to be done on the php page?
+1
A:
The wiki states:
For the user's browser to correctly recognize XFBML tags, you need to specify that the page is in XHTML. Thus, your page should begin with:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
KramerC
2009-12-30 07:04:26
+1
A:
I'd suggest taking a walkthrough of the XFBML setup docs. There are several requirements to go through before you can start rendering XFBML tags:
- In order for XFBML tags to work, you must specify
xmlns:fb="http://www.facebook.com/2008/fbml
as an attribute in your<html>
tag. - You need a cross-domain receiver file (
xd_receiver.htm
) - You need to include the
FeatureLoader.js
library. - You need to use the
RequireFeatures
call of the Facebook library to load the XFBML parser
There are walk-throughs available for setting up XFBML if you google around, but honestly that FB document is pretty straightforward. It's the one I always follow when setting up a new iframe app.
zombat
2009-12-30 07:48:13