javascript - Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's setting -
i having issue facebook app. error : given url not permitted application configuration: 1 or more of given urls not permitted app's settings. must match website url or canvas url, or domain must subdomain of 1 of app's domains.
i writing code , attaching screenshot of application setup page, understand issue. here code using :
<script> window.fbasyncinit = function() { fb.init({ appid : 'app-id', xfbml : true, version : 'v2.5' }); // place following code after fb.init call. function onlogin(response) { console.log("calling onlogin.."); if (response.status == 'connected') { fb.api('/me?fields=first_name', function(data) { var welcomeblock = document.getelementbyid('fb-welcome'); welcomeblock.innerhtml = 'hello, ' + data.first_name + '!'; }); } } fb.getloginstatus(function(response) { console.log("// check login status on load, , if user is"); console.log("/ logged in, go directly welcome message."); if (response.status == 'connected') { onlogin(response); } else { console.log("// otherwise, show login dialog first."); fb.login(function(response) { onlogin(response); }, {scope: 'user_friends, email'}); } }); }; (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')); </script>
Comments
Post a Comment