我为我的网站添加了 facebook 登录按钮。代码如下,
<html>
<head>
<title>My Great Web page</title>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'MY_APP_ID',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div class="fb-login-button" data-show-faces="false" data-width="200" data-max-rows="1" scope="user_about_me,user_activities,user_birthday,email" on-login="top.location = 'http://localhost/index.php/';">Login with Facebook</div>
</body>
</html>
当用户单击“使用 facebook 登录”按钮时,将显示具有扩展权限的身份验证窗口。当用户允许访问详细信息时,用户将被定向到 index.php 文件使用
on-login="top.location = 'http://localhost/index.php/';"
现在我想打印所有允许访问的详细信息,例如用户名、生日等。在 index.php 文件中
谁能告诉我该怎么做?