Version 16, last updated by MrBuzzy at February 03, 2008 15:18 UTC
The Facebook API
You can easily call the Facebook REST API from your Coldface application using Facebook().
Coldface will handle these API arguments so you don't have to: api_key, session_key, call_id, sig, v, format.
Return Types
Facebook() will convert the API response to CF return types, ie: simple, struct, array.
Arrays can contain structs and vica versa (to represent complex objects).
Arguments
When calling Facebook() the arguments are passed through to the Facebook REST server, except one special optional argument 'doRaw'.
method [string] : The Facebook API method name. The only required argument. Ie: method="friends.get".
!doRaw [boolean] : If true the cfhttp result is returned, instead of the facebook result converted to CF data types. Default is false.
A couple of examples demonstrating the use of Facebook().
<!--- Fetch the cookies of the current authenticated user, cookies are stored on the facebook server --->
<cfset !arMyCookies = Facebook(method="data.getCookies",uid=getAuthUser())>
<!--- Update the current users status --->
<cfset !bUpdateResult = Facebook(method="users.setStatus", status="is having a blast!")>