The Facebook API

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 16. over 4 years by MrBuzzy
  2. 15. over 4 years by MrBuzzy
  3. 14. over 4 years by MrBuzzy
  4. 13. over 4 years by MrBuzzy
  5. 12. over 4 years by MrBuzzy
  6. 11. over 4 years by MrBuzzy
  7. 10. over 4 years by MrBuzzy
  8. 9. over 4 years by MrBuzzy
  9. 8. over 4 years by MrBuzzy
  10. 7. over 4 years by MrBuzzy
  11. 6. over 4 years by MrBuzzy
  12. 5. over 4 years by MrBuzzy
  13. 4. over 4 years by MrBuzzy
  14. 3. over 4 years by MrBuzzy
  15. 2. over 4 years by MrBuzzy
  16. 1. over 4 years by MrBuzzy
 

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: "friends.get".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!arMyCookies = Facebook(method="data.getCookies",uid=getAuthUser())>

<!--- Update the current users status --->

<cfset bUpdateResult!bUpdateResult = Facebook(method="users.setStatus", status="is having a blast!")>