FaceBook UI using new PHP/JS API instead of FBML

Where do I find information on styling my application to facebook look/feel in a PHP/JS (JavaScript) canvas app in an iframe?

I have some code that is a FBML canvas app, but facebook is phasing that out and it seems you can only use the new PHP API with an iframe and the javascript (XFBML) SDK.

I have most of it working, but I can not figure out some simple things - like in FBML to show a nice facebook styled message, I could just do:

<fb:success><fb:message><?php echo $fbmessage; ?></fb:message></fb:success>


<fb:error message="An error has occurred." />

Those FBML tags seem to no longer parse - probably not supported by XFBML. So what are the replacements, or even better, where is the documentation on how to use the new iframe/javascript canvas setup and style it easily? Maybe a CSS file? JS calls? XFBML plugins?



There are no real guidelines for iFrame applications. Maybe it's worth consulting with a front end designer/developer to devise a visual framework for your application.

There are few things that you'll need to check to make sure your app will work as an iframe app instead of an FBML one:

  • Make sure your app's page are complete and valid XHTML
  • Make sure you have the xmlns:fb="http://www.facebook.com/2008/fbml" declaration on your root element
  • Wrap any existing FBML content in the following markup:

    <fb:serverFbml>       <script type="text/fbml">         <!-- your original FBML markup here... -->       </script>     </fb:serverFbml>

  • Lastly, if you aren't already, make sure your page calls FB.XFBML.parse() after calling FB.init().

Hopefully this gets you up and running.

Need Your Help

Are these monadic expressions equivalent

haskell monads

I come across some short piece of monadic code and I have a question not related to the actual subject of the example

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.