0
我已爲我的網站添加了Facebook登錄按鈕。代碼給出波紋管,如何訪問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登錄」,則顯示擴展權限驗證窗口。當用戶允許訪問的細節,用戶使用
on-login="top.location = 'http://localhost/index.php/';"
現在我想打印所有允許訪問的詳細信息,如用戶名,生日等定向到index.php文件。在index.php文件
任何人都可以請告訴我該怎麼做?
你爲什麼重定向登錄後的用戶?這有什麼特別的理由嗎? – 2012-03-20 08:00:13
原因是我需要將用戶的所有細節都分配到單獨的頁面。總之要做到這一點? – Roshanck 2012-03-20 08:06:17
至少有沒有辦法讓細節到同一頁? – Roshanck 2012-03-20 08:14:41