facebook login button not rendering
- by Neha
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>';