0

I am working on FQL to retrieve the friends count of a particular user.

When i use the query Select friend_count from user where uid = me() I get a number which is different from the count i get from this query i.e select uid2 from friend where uid1= me()

Why is an ambiguity here?

Does friend_count also includes pending requests then?

If yes how can retrieve those UIDs?

Select friend_count from user where uid = me() returned me X and select uid2 from friend where uid1= me() returned me Y.

My X is greater than Y which makes me think if X includes the pendin g requests but i am not able to find (X-Y).

Jimmy Sawczuk
  • 13,488
  • 7
  • 46
  • 60
Karthik
  • 315
  • 1
  • 4
  • 17
  • Perhaps you are hitting a query limit on the second one ? – Aviram Segal Jan 03 '13 at 13:58
  • @Aviram Nope. The first one returned me 948 and the when i manually counted the list of uids returned by second its 906. So I thought the 42 will include either the subscribers or pending request. Now after investigating further i doubt these are the uids of those who had deactivated their profile because the user table doesnt have a matching name to their UIDs. Am i correct? – Karthik Jan 04 '13 at 02:22

1 Answers1

1

The difference is that friend_count returns the total number of friends, regardless of their privacy settings.

Counting the results of SELECT uid2 FROM friend WHERE uid1= me() may be lower because users who have either restricted their visibility in Settings->Apps->Apps Others Use or have turned off Platform Apps will never be returned in FQL or Graph API queries.

cpilko
  • 11,792
  • 2
  • 31
  • 45