facebook login button not rendering

Posted by Neha on Stack Overflow See other posts from Stack Overflow or by Neha
Published on 2010-12-31T05:48:29Z Indexed on 2010/12/31 5:54 UTC
Read the original article Hit count: 190

Filed under:
|

Hi I am developing a widget that will be placed on an external website. The entire plugin has to be written in javascript. I haev searched here and there but am unable to make the facebook login button appear on the widget

My code is the following

    var fbroot = document.createElement('div');
        fbroot.id = "fb-root";
        window.fbAsyncInit = function(){
            FB.init('xxxxxxxxxxxxxxxxxx', '/xd_receiver.htm');       
        };

    var contentRightDiv = document.createElement('div');
    contentRightDiv.id = "contentrightdiv";
    contentRightDiv.innerHTML = "<form><p><label>Sign in using <div id='socialmedialoginbtns'></div></label></p></form>";

var socialmedialoginbtns = document.getElementById('socialmedialoginbtns');
    socialmedialoginbtns.innerHTML = '<fb:login-button show-faces="false" width="200" max-rows="1"></fb:login-button>';

© Stack Overflow or respective owner

Related posts about facebook

Related posts about facebook-connect