Reputation: 11
I am trying to create a facebook web app, but am unable to get any of the friends through facebook javascript API. What I basically want my app to do is that it will ask a user to login and then after authorization, his/her all the friends{weather using the app or not} should be displayed.
Is it possible to get friends who don't use the app at all? If so, please tell me how! :)
img : http://postimg.org/image/9r959i38n/
code in my app:
FB.api('/me/friends',function(res){
console.log(res.data[0].name); //just sample output
});
Thanks
Upvotes: 1
Views: 240
Reputation: 81
Here's two new APIs for:
Inviting friends - https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends
Tagging friends -https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends
Upvotes: 1
Reputation: 11297
With the release of version 2.0 of the API,
In Graph API v2.0, access to
/me/friends
is no longer part of the default (public_profile) permissions. We now require you to ask for the new permissionuser_friends
. With this permission,/me/friends
now returns the person's friends who are also using the app.
https://developers.facebook.com/docs/apps/changelog#v2_0_permissions
You can use version 1.0 till April 30th 2016.
http://graph.facebook.com/v1.0/
Opinion: This change will put an end for spam apps
Upvotes: 0
Reputation: 38046
/me/friends
now only returns friends who are also using your app - https://developers.intern.facebook.com/docs/apps/changelog#v2_0_graph_api
See the full document for new APIs that might solve your problem instead.
Upvotes: 13