The new graphapi makes getting Facebook connect super easy, but putting all the pieces together is a little tough.
What you need to do is set-up the Facebook connect button, and let it save the cookies for you. From there you can get an access token, required to get information back from the API. You can use cfhttp calls and get JSON back.
Note: You need to request the permissions that you want in the button HTML, for example ours looks like this:
<fb:login-button perms="email, user_education_history, friends_education_history, publish_stream, offline_access">
Once this is done, you can use some ColdFusion to read the cookie and get the accesstoken.
<cfset left = Find("access_token=",cookie.fbs_239625941285)+13>
<cfset right = Find("&",cookie.fbs_239625941285,left+1)>
<cfset accessToken = Mid(cookie.fbs_239625941285,left,right-left)>
<cfoutput>Access Token = #accessToken#</cfoutput>
And to get the Facebook ID:
cfset left = Find("&uid=",cookie.fbs_239625941285)+5>
<cfset len = len(cookie.fbs_239625941285)-left>
<cfset SESSION.FBID = mid(cookie.fbs_239625941285,left,len)>
<br><cfoutput>Facebook ID = #SESSION.FBID#</cfoutput>
The next thing is to use the Graph Explorer tool to find the syntax for what you want to pull:
For example to get e-mail we use the code:
<cfhttp url="https://graph.facebook.com/100000929135466/?#accessToken#" method="get" />
<cfset response = DeserializeJSON(cfhttp.filecontent) />
<p>email = #response.email#</p>
You can try an example here:
And I have uploaded the CFM files here:
Let me know if you have questions or comments!