4 Replies Latest reply on Sep 24, 2010 12:21 PM by Dana Heath

    How to get xmlns:fb to render

    Dana Heath Newbie

      Hi all,


      I'm trying to write a Facebook app using RichFaces,  but am getting stuck with what seems to be something pretty simple. In  order for the Facebook login button (<fb:login-button/>) tag to  render properly, the xmlns:fb="http://www.facebook.com/2008/fbml" needs  to be rendered to the browser. However, when my .xhtml page renders, it  only includes the following:


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

      How  do I get that namespace attribute to render to the browser? Thanks.


      .xhtml  code:


      <html  xmlns="http://www.w3.org/1999/xhtml"
           xmlns:rich="http://richfaces.org/rich" xml:lang="en" lang="en" >
           <ui:composition template="layout.xhtml">
              <ui:define  name="content"><h:outputText value="#{facebookBean.init}"/>
                  <fb:login-button  perms="email">Install My App</fb:login-button>
                   <div id="fb-root"></div>
                  <script  src="http://connect.facebook.net/en_US/all.js"></script>
                    FB.init({appId: '666', status: true,  cookie: true, xfbml: true});
                     FB.Event.subscribe('auth.login', function(response) {
                       // Reload the application in the logged-in state
                       window.top.location = 'http://apps.facebook.com/blah-blah-blah/';
                    FB.Event.subscribe('auth.sessionChange',  function(response) {
                      if (!response.session) {
                        // The user has logged out, and the  cookie has been cleared