-4

I am running below query but it display like 10 20 results even though i have thousands of friends

how can i get all friends userids ?

SELECT uid1  FROM friend WHERE uid2 = me()
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
  • You can't. The API just return the friends that are actually using the app – WizKid Mar 06 '15 at 23:10
  • @WizKid so you can not get your own profile friends list ? I am the app owner. – Furkan Gözükara Mar 07 '15 at 00:02
  • @WizKid if have user id can i query whether he is my friend or not ? – Furkan Gözükara Mar 07 '15 at 00:05
  • You can get the your friends that are using the app. Whether who is your friend? If they are not using the app what would you query against? – WizKid Mar 07 '15 at 00:09
  • @WizKid the reason why i am asking simple. Lets say i have 1000 friends at my profile. And then i make a post. Then i want to see which of my friends liked my post. However not all my friends uses this app i created. So it is not possible for me to find out which of my friends liked that post ? – Furkan Gözükara Mar 07 '15 at 00:41
  • No it is not if they are not using your app – WizKid Mar 07 '15 at 00:45
  • @WizKid however when i list the post like this facebook shows who is my friend and who can i add friend : https://www.facebook.com/browse/likes?id=798977736804548&actorid=198765706825757 – Furkan Gözükara Mar 07 '15 at 00:58

1 Answers1

1

Not every info is available with the API. And as Wizkid commented, you only get friends who authorized your App too. But you should not use FQL for this, it´s a simple call to /me/friends with the Graph API.

You can find more information in the changelog: https://developers.facebook.com/docs/apps/changelog

There is also a very detailed answer about that topic in this thread: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130