-1

I have built a React Native app which has login via facebook and also tried to access the list of users who has installed my app. To do so i have used me/friends graph api which should return the app-user list. But it only returns one friend. Why i dont get all user list? any help???

enter image description here

Wahidul Alam
  • 1,216
  • 4
  • 26
  • 56
  • If my friends logged in by facebook won't they get the authorization with the user_friend permission? if so how do they will get the authorization?? in the case of the friend who's name is returning she just logged in my app with facebook. thats it. Her name is showing but others are not. How to do that? – Wahidul Alam Mar 07 '18 at 15:21
  • see my answer. every friend has to authorize your app with the user_friends permission or they will not show up. make sure you ask for the user_friends permission in the login process. – andyrandy Mar 07 '18 at 15:22

1 Answers1

1

You can´t get the list of all users who have installed your App, you can only get a list of your friends who authorized your App with the user_friends permission too. It seems that only one friend of yours authorized your App.

andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • Thanks for the reply. I understand what you said. But dont know how to do this. Can you please share me any link that i can know how to give authorization during login process? – Wahidul Alam Mar 07 '18 at 15:44
  • i thought that you already have an existing react native app, with a login? what package are you using for the login? i am sure there are good docs for permissions. – andyrandy Mar 07 '18 at 15:57
  • yes i do have react native app and login with following code: const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync('appid', { permissions: ['public_profile','email'], }); – Wahidul Alam Mar 07 '18 at 16:01
  • well....why why not add the permission i was talking about then? ;) – andyrandy Mar 07 '18 at 16:02
  • u mean i need to add a user_friends permission parameter in the array?? – Wahidul Alam Mar 07 '18 at 16:08
  • well...what else? those are the permissions. ;) – andyrandy Mar 07 '18 at 16:14
  • ha ha .. ok let me check with that .. thanks a lot dear. – Wahidul Alam Mar 07 '18 at 16:18
  • Quick question if you're able to answer @luschn - do you have any idea how to get a user's list of friends aside from `taggable_friends`? I have an app, the user authorizes it access, it pulls in a few of your friends chosen at random and then you sort them into categories and use phantomJS to generate an image of your results that gets posted to your facebook. Facebook is protective of `taggable_friends` and denied me access claiming its only for "in-context stories (e.g. getting coffee - with john)". – Stephen Tetreault Mar 08 '18 at 20:01
  • there is no other way. there is only taggable_friends (which is for tagging only) and invitable_friends (which is for inviting only). what you want to achieve is not possible at all, i am afraid. if you want to build an app around fb friends, you have to use friends who authorized your app. it is also a privacy thing, i would not want any app to be able to post some random picture where i am in - if i did not authorize that app by myself. – andyrandy Mar 09 '18 at 06:44