1

I am developing an application for FB Login with website using Javascript and JSF. I have included my FB-Login button tag <fb:login-button scope="email"></fb:login-button> inside my code. when i run it, it does't show login button in my webpage. I am using Eclipse Juno editor and Apache Tomcat 7.0. How do i get Login button in my webpage? The thing is, it works fine in html.

I have attached my fbLogin.xhtml code at here.

Community
  • 1
  • 1
Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66

2 Answers2

1

Put your body tag as <body></body> not by this <h:body></h:body> and place <fb:login-button scope="email" /> before <h:form> tag.

Example:

<body>
     <fb:login-button scope="email" />

            <h:form>
             ... 
            </h:form>
<body>

Now it will work fine.

Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66
  • 1
    This still didn't work for me. I get "fb:login-button" is not bound. – sgoldberg Apr 09 '14 at 10:50
  • 1
    @sgoldberg see this link http://stackoverflow.com/questions/20263746/warning-this-page-calls-for-xml-namespace-http-www-facebook-com-2008-fbml-dec.. – Wanna Coffee Apr 17 '14 at 05:43
1

you can make it as JS also

<script>
//<![CDATA[

document.write('<fb:login-button scope="email" />');

//]]>
</script>
Jay Ehsaniara
  • 1,421
  • 17
  • 24