1

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?

Juan
  • 11
  • 2
  • 1
    To say only, "[it] is not working" is **not** how you report a failure in an SO question. How does it fail? Do you get a `FacebookRestClientException`? If so, what's the exception code? http://tinyurl.com/so-hints – Peter Bailey Sep 08 '10 at 22:57
  • im getting an error 604 wich according to facebook means "Your statement is not indexable" but uid2 and uid1 ARE indexable, so there has to be something more to it, i've being doing research on this but still unable to fix this – Juan Sep 08 '10 at 23:44

1 Answers1

0

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.

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

Community
  • 1
  • 1
kelly.dunn
  • 1,466
  • 3
  • 16
  • 22
  • 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 Sep 08 '10 at 23:45
  • 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 Sep 09 '10 at 21:41