0
我想在我的web应用程序中实现Facebook登录。我得到了应用程序ID和我的代码是follows.` 我的Facebook登录页面 Facebook登录在网络应用程序
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<<App Id>> ', // App ID
channelUrl : '//www. DOMAIN NAME.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script><div class="fb-login-button"><a href=" ">Login with Facebook</a></div>
</body>
`。我正在尝试运行此应用程序并为其提供错误。我也得到了密钥,但不知道在哪里放置它。我们是否需要为此放置任何css或js或任何其他文件?
任何帮助是极大的赞赏..
,请列明错误! –
它说..“发生错误”稍后再试 –
user1277996