真的很愚蠢的問題,但我不明白這一點。我試圖讓用戶通過使用Coldfusion的網站登錄Facebook。Coldfusion,臉書整合
我想通過一個簡單的教程貼在這裏跟着:http://jcreamerlive.com/2011/01/12/facebook-and-coldfusion/
我只是想讀取cookie FB應該返回
我的代碼是
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: "XXXX", status: true, cookie: true, xfbml: true});
// This is bascially code to subscribe to an event handler
// Any time someone does any sort of session change i.e. login, logout,
FB.Event.subscribe("auth.sessionChange", function(response) {
if (response.session) {
// A user has logged in, and a new cookie has been saved
window.location.reload();
} else {
// The user has logged out, and the cookie has been cleared
}
});
</script>
<fb:login-button></fb:login-button>
<div id="fb-root"></div>
<cfif isDefined("cookie.fbs_XXXX")>
<cfoutput>#cookie.fbs_XXXX#</cfoutput>
<cfelse>
0
</cfif>
</body>
</html>
所以對我來說,它看起來好像在登錄後沒有收到cookie。如果那是這種情況,爲什麼不呢? 我知道我概念
失去了一些東西我真正想要的是返回的用戶名和個人資料圖片這要是我得到的UID,我可以得到。
感謝您的任何幫助。