i'm trying implement facebook login on website using facebook javascript sdk. following the docs set basis this:
// loads fb sdk asynchronously window.fbasyncinit = function() { fb.init({ appid : 'xxx', cookie : true, xfbml : true, version : 'v2.2' }); }; (function(d, s, id){ var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) {return;} js = d.createelement(s); js.id = id; js.src = "//connect.facebook.net/en_us/sdk.js"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk')); after try invoke fb.getloginstatus() method this:
$(function() { $('#fb-login').click(function(){ console.log('clicked login button'); fb.getloginstatus(function(response) { console.log(response); }); }); }); but unfortunately console says this:
"clicked login button" error: __nosuchmethod__ deprecated does know wrong , how can fix this? tips welcome!
it humiliating this, turned out browser plugin ghostery blocked loading of facebook sdk. after turning off, worked charm.
i hope answer helps other people running stupidity fix bit faster did.. :)
i wish beautiful day!
Comments
Post a Comment