Facebook login dialog doesn't open when using javascript -


i'm using eclipse ide on mac. i've created simple web page if click button ask sign in facebook. here code.

<!doctype html> <html> <head> <title>facebook login javascript example</title> <meta charset="utf-8"> </head> <body> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>  <script> function getuserdata(response) {     if(response.authresponse) {         fb.api('/me', function(response) {             $('#loginbtn').innerhtml = 'hello ' + response.name;         });     } }  window.fbasyncinit = function() {           fb.init({             appid      : 'xxxxxxxxxx',             cookie     : true,               xfbml      : true,               version    : 'v2.8'            });            fb.getloginstatus(function(response) {             getuserdata(response);           });     };           (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'));   //add event listener login button $('#loginbtn').on('click', function() {     fb.login(getuserdata, {scope: 'email,public_profile', return_scopes: true}); }); </script>  <button id="loginbtn">hello</button> <div id="response"> </div>  </body> </html> 

here i'm running on local host. url http://localhost:8080/testtest/index.jsp .. when run application, message on console. can't load url: domain of url isn't included in app's domains. able load url, add domains , sub-domains of app app domains field in app settings.

how change domain url?? how include domain of url app

it means need add url http://localhost:8080 facebook app ie @ developers.facebook.com created app in first place.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -