Friday, January 14, 2011

Getting All Friends of a Facebook Application

Everyone loves Facebook.

Well almost everyone anyway...

Developer's are among those who've grown to hate Facebook and their constant API changes, although the new "Graph API" does appear to be making constant strides toward being a solid, stable environment for developers.

One of the problems I have run into when working with the API, is that I want my application to get all of a user's friends who also use the application. After scouring the (still incomplete) API docs, I turned to the forums, where I found the following function.


$facebook->api(array('method' => 'friends.getAppUsers'));


This, although currently undocumented, is a great feature for any application you build for Facebook where you want to see friend's scores, results, etc.

Hope it helps someone out there as it has helped me!

No comments:

Post a Comment