사용자 정의 필드로 작업하는 등록 양식을 얻고 리디렉션 페이지의 쿠키를 통해 사용자 정의 필드를 검색 할 수 있습니다. 내가 알 수없는 것은 다음 페이지에서 Facebook 정보 (이름, 이메일, 생일)를 검색하는 방법입니다 (저는 PHP 사용자가 아닙니다). 문서를 여러 번 읽었을 때 "데이터 읽기"섹션 (FB Documentation)을 사용하고 인터넷을 검색했지만 PHP 및 C# 솔루션 만 찾을 수 있습니다.Facebook 등록 - 자바 스크립트로 데이터/서명 된 요청 읽기
누군가 나를 도울 수 있다면 javascript, jQuery 또는 ColdFusion 솔루션을 찾고 있습니다.
다음은 빠른 참조로서의 나의 코드입니다. 쿠키 정보는 쿠키 정보를 덤프합니다.
<html>
<head>
<title>My Facebook Login Page</title>
</head>
<body>
<!--- Facebook Call --->
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'myAppID', // App ID
channelUrl : 'http://.../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
});
};
// 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>
<!--- Output Facebook Box--->
<fb:registration redirect-uri="http://.../page2.cfm"
fields='[
{"name":"name"},
{"name":"email"},
{"name":"displayName","description":"Display Name:", "type":"text"},
{"name":"location"},
{"name":"birthday"}
]'
onvalidate="validateAndSave">
</fb:registration>
<!---Validation + set Cookie --->
<script>
function validateAndSave(form) {
if (!form.displayName) {
return({"displayName":"Display Name is Required"});
}
document.cookie = 'fbInfo='+'displayName='+form.displayName;
return {};
}
</script>
</body>
여기