I am creating an app and would like people using the app to find friends using the same app on Facebook. Any help on this would be great.
I know this can be done. I have seen it on Instagram and Tiger Woods 12.
Once you've authorised the user and obtained an access token, you can quickly determine which of their friends have already authorised your app with a call to /me/friends?fields=installed
For the users' friends who have already authorised the app, the result will look like this:
{
"installed": true,
"id": "{USER_ID_GOES_HERE}"
},
and for the users who have not already authorised the app, the result will look like this:
{
"id": "{USER_ID_GOES_HERE}"
},
If you're doing this in the iOS SDK you won't see that exact return value, but the SDK should put the results into a data structure you can use, and check for the presence of the 'installed' item
You can also request additional User object fields other than just 'installed', but this is just a quick example to show you how to get the list of friends that use the app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With