function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kprkpr 

Problem with facebook Integration

I am trying to use the 'Login with Facebook' button on my visualforce, which will ultimately be used on sites.

But I get the following error:

Error: Unknown component fb:login-button

 

I already searched the forum and this is the only sample I found:

http://208.74.204.95/t5/Force-com-Sites/Integrating-with-facebook-a-pain-Visualforce-compiler-gets-in/m-p/198366

 

I tried using the methods in there too, but they didn't work.

 

Here's my code:

<apex:page >
  
  <div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'my_app_id', status: true, cookie: true,
             xfbml: true});
    FB.getLoginStatus(function(response) {
      if (response.session) {
        console.log('logged in and connected user, someone you know');
      } else {
        console.log('no user session available, someone you dont know');
      }
   }); 
    
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src=document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
 

</script>

<div xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
 <fb:login-button show-faces="false" width="200" max-rows="1"></fb:login-button>
</div>
<script src="http://connect.facebook.net/en_US/all.js#appId=147159395362207&amp;xfbml=1"></script>

</apex:page>

 

Can anyone help me out please?

 

Thanks in advance

kpr

Shashikant SharmaShashikant Sharma

See this if it can help you 

http://fbforce.blogspot.com/

kprkpr

Thanks for the link Shashikant. But the blog doesn't talk about logging in using the <fb:login-button> tag.