Here is the situation break-down.
*Facebook is deprecating FBML this year, 2011.
*FBML is most often used to create facebook page tabs. Since facebook is deprecating FBML it no more makes sense.
*Facebook documents say developers need to go with Iframe apps from now on and not FBML.
*So in order to create a facebook page tab, one needs to create a facebook application(IFRAME) and add the app as a page tab.
*BUT, iframe is not allowed inside page tabs, as in tags such as body , any custom Javascript is not allowed inside a page tab.
So its a messy situation. Is there any solution to this problem? the answer is NO. Going still with FBML is the only solution.
I had to spend hours and hours to find out that there is no solution to this problem as of now. The only way is to go with FBML even though Facebook suggests against doing it. And thats exactly why i am posting this. So you guys save time.
There is a super easy way to add a facebook application(IFrame) to your page as a tab. Just an URL with the following format will do.
http://www.facebook.com/add.php?api_key={your_facebook_app_key}&pages=1&page={page_id}
Here is an example. You will know what i am talking about
http://www.facebook.com/add.php?api_key=d702312c39692db23db1f5b321051191&pages=1
And now an another problem with facebook Iframe app as your page tab. I am very sure most of the time you will need to access the visiting user’s information. But hey guess what? You cannot access it. Period. (if your page tab is a facebook application).
You will need to prompt the user for permission to access it. I have not tried doing it. I just used FBML even though its against what Facebook suggests. Facebook has seriously messed this up and i hope they will sort this entire FBML vs IFrame thing soon or else developers might go crazy.
Went crazy but now fine,
Keyan