0

I am developing the app which is login through the facebook account using link

and use the parse to store data in backend Parse Facebook Example

My requirement for this app is to get Facebook Friend List who downloaded this app on there phone ...

I am getting the the Friend List but I still don't know how to get the who downloaded this app from my friends...

I am getting the friends facebook Id but It didn't get the user other profile information like name

Could anyone tell me how to get this...

Thanks.

SAndroidD
  • 1,745
  • 20
  • 33
  • You don't need other info from the facebook profile. Only match facebook id against what you have stored earlier. Matching names is thoroughly unreliable as loads of people have identical names. – Marius Waldal Apr 25 '14 at 12:18
  • but friends name I would like to display in list. I have there Facebook id – SAndroidD Apr 25 '14 at 12:20
  • I understand. But what is the point of showing the names of friends that have NOT downloaded your app? It makes sense to me to only show the list of friends that DID download the app, and for those you already have the names in the Parse user profile (I would guess...) – Marius Waldal Apr 25 '14 at 12:29

2 Answers2

0

You can use the FQL query to get the friends who are using the app-

SELECT uid FROM user WHERE is_app_user=1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

Demo: https://developers.facebook.com/tools/explorer?fql=SELECT%20uid%20FROM%20user%20WHERE%20is_app_user%3D1%20AND%20uid%20IN%20(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me())

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
0

You need to let people be able to "connect" their facebook account with your app. When they do, store their facebook id in your User table. Then you can get a person's friends list and then query your Parse database to see if any of those user IDs match people who have stored their facebook ID.

For more info, check this answer: Replicating parse.com anypic in JavaScript - Unable to compare Fb users

Community
  • 1
  • 1
Marius Waldal
  • 9,537
  • 4
  • 30
  • 44