javascript - facebook register localhost fail -
i'm trying utilize facebook registration plugin on localhost. problem registration box won't show up.
here screenshots: https://dyp.im/fxwee52ojc
https://dyp.im/nrjfe2ulb9
here code:
<!doctype html> <html> <head> <title>facebook login javascript example</title> <meta charset="utf-8"> </head> <body> <div id="fb-root"></div> <script> window.fbasyncinit = function() { fb.init({ appid: 'xxxxxxxxxxxx', cookie: true, // enable cookies allow server access // session xfbml: true, // parse social plugins on page version: 'v2.0' // utilize version 2.0 }); }; // load sdk asynchronously (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> <fb:registration redirect_uri="http://www.google.com" /> test </body> </html>
see documentation, facebook requires redirect_uri within own site:
redirect_uri: uri process signed_request. must prefixed site url, defined in app dashboard. field required.
so need alter registration tag this:
<fb:registration redirect_uri="http://localhost/callback-fb-registered" /> javascript php facebook laravel localhost
No comments:
Post a Comment