views:

42

answers:

1

Hi, i have a facebook app, in wich the administrator of the app needs a report of the users registered to this app and one of the data i need is to get how many friends does a user registered to my app has, i was trying with fql using a query like this

$facebook->api_client->fql_query("select uid2 from friend where uid1=$userId");

but is not working, is there any other way to achieve this?

A: 

I remember the facebook API Documentation to be rather sparse with this sort of thing, but maybe you want to look into the facebook Graph API. From there, you can get registered users of your application.

http://stackoverflow.com/questions/2785093/facebook-friends-getappusers-using-graph-api

http://developers.facebook.com/docs/api

==EDIT==

Facebook Graph API pattern: https://graph.facebook.com/ID/CONNECTION_TYPE

If you want all the friend data from any user, you can use https://graph.facebook.com/USER_ID/friends

kelly.dunn
Hi thanks for the answer, im able to get users registered to the application, but im unable to get their total number of friends
Juan
You should be able to do this through the graph API. You can use the pattern https://graph.facebook.com/ID/CONNECTION_TYPE for almost any piece of information. For your purposes: https://graph.facebook.com/USER_ID/friends
kelly.dunn

related questions